Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Navigation Menu Site Map Difficulties

Reply
Thread Tools

Navigation Menu Site Map Difficulties

 
 
Allen Racho
Guest
Posts: n/a
 
      03-22-2006
Hello, all! Great to find this resource.

I have an asp:Menu control on a page that gets its data from a SiteMapDataSource (which in turn draws data from a SQL Server). Everything works well, as expected, WRT normal navigation menu operation.

However, what is the recommended practice -- if there is one -- for easily excluding submenu items so that they don't appear on any menu, but still show up in the SiteMapPath ("breadcrumbs") control?

Let me provide a concrete example. Here's a snippet of the main menu:

[Home] [About] [Contact]

When the user submits a message through the Contact form, one of two results pages are called: Success.aspx or Failure.aspx. In the SiteMap data source, I have made the nodes for these two pages as children of the Contact page node. As such, when called, they appear in the breadcrumb trail as follows:

Home >> Contact >> Success|Failure

However, they also annoyingly appear in the dynamic drop-down under the main menu item for Contact!

You get the idea... So, is there a built-in way to exclude child nodes from appearing under a parent item, but still appear normally in the breadcrumb trail?

Thanks much!

Allen
 
Reply With Quote
 
 
 
 
Ward Bekker
Guest
Posts: n/a
 
      03-23-2006
Hi Allan,

No Solution for you unfortunately, but I also had that problem once and
discovered it's not easy to change. I was a bit disappointed about that
because this is a common scenario.

--
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
 
Reply With Quote
 
 
 
 
Allen Racho
Guest
Posts: n/a
 
      03-24-2006
Ward, thanks for the reply. I have actually managed to solve this particular issue by some [read: a lot] of digging around. It involves actively removing items from the menu list (e.g. menu.Items.Remove()) before the menu is rendered. If you want the exact code for this, which appears to work flawlessly (if only for future reference), send me an email at allenrachoATSYMBOLyahooPERIODcom.

Now however, I have run into a another very annoying issue WRT built-in ASP.NET 2.0 menu. I cannot get the menu to reliably highlight active items appropriately!

Example top level menu items:

[Home] [About] [Projects]

Example child menu items:

[About]
-Privacy Policy
-Terms of Use

[Projects]
-Page 1
-Page 2
-Page 3

When selecting the top-level ("parent") menu items, they stay highlighted just fine. Meaning, if you select "Projects", you will land on the Projects page and the appropriate menu item will be highlighted.

However, if you select "Page 2", you will land on the Projects page, and NOTHING will be highlighted, which is slightly disorienting. Ideally and logically the parent menu item (Projects) should be highlighted to give the user a proper sense of place in the site.

Right now, I have a solution that works one way or the other. Either I can get all the parent items to appropriately highlight, or I can get the child items to cause their parent menu items to highlight - but suddenly highlighting the parent menu items themselves stops working.

Any ideas?

Allen
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
site map and navigation Jim ASP .Net 1 01-14-2008 07:38 PM
Disable the navigation buttons for IE navigation toolbar Laurahn ASP .Net 3 02-06-2007 04:17 AM
asp.net 2.0 site menu control (from navigation block) and IE 5 compatibility Dmitry Klymenko ASP .Net Web Controls 2 01-08-2007 09:24 PM
Horizontal Menu Navigation Web Control - Spaces Between Menu Items Philip ASP .Net Web Controls 1 03-21-2006 01:55 PM
Examples of building web site navigation for ASP.NET site? Jason Hanks ASP .Net 2 06-21-2004 11:24 PM



Advertisments