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  |  

PortalWebHosting
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

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.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
 


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
67 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
325 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
67 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
67 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
219 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.

 


DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk
Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com
Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com

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