Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Coding problem in Skin
Previous Previous
 
Next Next
New Post 6/16/2008 2:55 AM
User is offline rjdejong
66 posts
www.rjdejong.net
10th Ranked


Coding problem in Skin 
Modified By rjdejong  on 6/16/2008 8:50:40 AM)
I'm using the following code in a skin.asxc file:
<%
Dim currentLevel = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.Level
Dim currentTabID = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.TabID

If currentLevel = 2 Then
%>

<div id="submenu">

<uc1:HouseMenu id='HouseMenu2' runat='server' Scope='<% currentTabID %>' ShowAdmin='True' IsRecursive='False' Orientation='H' />

</div>
<%
Else
Response.Write("Else called...")
End If
%>

Using this code im getting the following error.

An error has occurred.
DotNetNuke.Services.Exceptions.ModuleLoadException: Conversion from string "" to type 'Integer' is not valid. ---> System.InvalidCastException: Conversion from string "" to type 'Integer' is not valid. ---> System.formatException: Input string was not in a correct format. at Microsoft.VisualBasic.CompilerServices.DoubleType.Parse(String Value, NumberformatInfo Numberformat) at Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value) at TimRolands.DNN.SkinObjects.HouseMenuSkinObject.HouseMenuSkinObject.LoadSettings() --- End of inner exception stack trace ---

Now i'm a complete ASP / DNN novice so i might be trying to do things that you aren't suposed to do :p. But basicly i want to create House Menu's based on some simple Variables like Level or hasChildren. Can anyone help me with this cause i seem to be doing something wrong and i have no idea what to try next.

Appreciate any help you can give me. Thanks.

Greetz R-J


www.rjdejong.net
 
New Post 6/16/2008 11:09 PM
User is offline eck two
322 posts
8th Ranked


Re: Coding problem in Skin 

Try to specify the datatype when you dim something.

 
New Post 6/17/2008 12:23 AM
User is offline rjdejong
66 posts
www.rjdejong.net
10th Ranked


Re: Coding problem in Skin 
Modified By rjdejong  on 6/17/2008 3:29:07 AM)

I tried the following, but still got the same errors.

cStr(DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.TabID)
Int(DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.TabID)
Scope=' <% cStr(currentTabID) %>'
Scope=' <% Int(currentTabID) %>' 
 

I thought in ASP you don't have to declare what type of variable it's goin to be.

Thanks for the help, but still no anwser .

Greetz R-J


www.rjdejong.net
 
New Post 6/20/2008 1:37 AM
User is offline rjdejong
66 posts
www.rjdejong.net
10th Ranked


Re: Coding problem in Skin 

Anyone.


www.rjdejong.net
 
New Post 6/20/2008 2:36 AM
User is offline John
215 posts
ewds.strath.ac.uk
9th Ranked


Re: Coding problem in Skin 

After checking that a little I'm not certain that the skin can accept code in this manner at all.

One option would be to try it recoded in this kind of form: (Please note I haven't tested this code)

 <script runat="server">

 

 Dim currentLevel as string = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.Level.ToString Dim currentTabID as string = DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.TabID.ToString If currentLevel = 2 Then HouseMenu2.Scope = currentTabID submenu.visible = True Else submenu.visible = False

</script>

 


<div id="submenu" runat="server"> <uc1:HouseMenu id='HouseMenu2' runat='server' ShowAdmin='True' IsRecursive='False' Orientation='H' /> </div>


John Nicholson
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Coding problem in Skin
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


CrystalTech
CrystalTech Web Hosting™ provides first-class service and support. Our value-packed ASP.NET plans offer DNN installation, SQL 2005 and up to 100 domain names starting at only $16.95 per month!
CrystalTech.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP