Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Greetings,

 

I'm starting to play around in asp.net once again using the Personal Web Site Starter Kit. In the Default.master page, I have a menu control being created using a datasourceid property set to a sitemapdatasource control:

               <asp:menu id="menub" runat="server" 
                   datasourceid="SiteMapDataSource1" 
                   cssclass="menub"
                   orientation="Horizontal" 
                   maximumdynamicdisplaylevels="0" 
                   skiplinktext="" 
                   staticdisplaylevels="2" />
<asp:sitemapdatasource id="SiteMapDataSource1" runat="server" startingnodeoffset="0" />

I'm also using a SiteMapPath control in the same master page:

<asp:SiteMapPath id="SiteMapPath1" runat="Server" PathSeparator=" > " RenderCurrentNodeAsLink="false" />

What I would like to do is somehow override the menu/sitemapdatasource controls so that it skips one of the entries in the web.sitemap file. However, I would like to leave the entry in the web.sitemap file for the SiteMapPath control to show the value. Any idea where to begin? :confused:

My name in binary (from ASCII):

01000001011001000110000101101101 010100000110010101110100011100100110100101100101

Posted

No, not security related. I just don't want the link (maybe others in the future) to be included in the menu creation. If I were to include the link in the web.sitemap file, the page would look like the following:

top menu:  link1 link2 link3 OnlyShowCurLocationlink

Current location: Homelink > OnlyShowCurLocationlink

bottom menu: link1 link2 link3 OnlyShowCurLocationlink

However, I want it to look like this:

top menu:  link1 link2 link3

Current location: Homelink > OnlyShowCurLocationlink

bottom menu: link1 link2 link3

If I can't override the creation, is it possible to have two web.sitemap files (one for the SiteMapPath control and one for the menu control)? I would prefer not having to do this, as I would need to maintain two files...

My name in binary (from ASCII):

01000001011001000110000101101101 010100000110010101110100011100100110100101100101

Posted
As a temporary workaround, I'm going to leave the link out of the web.sitemap file and create an absoultely positioned DIV with the hard-coded path for the page in question. Maybe when I become more proficent in .net capabilities, I can see how to overcome this .net control problem. I'm rather suprised that no one here knows of a way...

My name in binary (from ASCII):

01000001011001000110000101101101 010100000110010101110100011100100110100101100101

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...