homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

Can you hide a link in a SiteMap, yet still show the breadcrumb on the SiteMapPath

Msg#: 4209994 posted 3:31 pm on Oct 1, 2010 (gmt 0)

We have a dynamic sitemap and all nodes in the sitemap display a breadcrumb.

Is it possible to have the breadcrumb still showing, but make the link in the sitemap invisible or non-clickable?

Reason for this is that...
we dont want users to select some pages from the sitemap (becasue they need to conduct a search first to populate a datagrid) and clicking on the link will only take them to an empty page.

I tried just removing the url, or having a blank title, but that didn't work.

perhaps a stylesheet and set display=none or something..?

< siteMapNode title="my title"
description="my description"
url="~/folder/mypage.aspx" >
< / siteMapNode >



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4209994 posted 8:27 am on Oct 3, 2010 (gmt 0)

HI sypa, welcome to WebmasterWorld!

The asp:Menu control has an onMenuItemDataBound event where you can intercept the MenuItems as they are being added.

Here is a simple example of how to remove a specific MenuItem based on its Text value:

protected void Menu1_MenuItemDataBound(object sender, MenuEventArgs e)
// Check the MenuItem Title
if (e.Item.Text == "my title")
// Needs to be removed, check if it is a SubItem
if (e.Item.Parent != null)
// Remove from ParentNode
// Remove from the Root of the Menu

Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved