CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 11/13/2005 1:51:59 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 24 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
some_guy
Asp.Net User
Selecting parent menu item11/13/2005 1:51:59 AM

0/0

Hi,

I'm using the new Menu control in ASP .NET v2. It is set up to use a site map XML file. It currently shows only the top level pages. If the current page is a child of the menu item, I would like the menu item to appear selected. How do I do this?

Thanks in advance!
dannychen
Asp.Net User
Re: Selecting parent menu item11/14/2005 5:45:45 PM

0/0

Setting a style on the hierarchy of the selected item is not a supported feature in the menu but we are looking at it for the future.
--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
dthayer
Asp.Net User
Re: Selecting parent menu item2/15/2007 2:38:35 PM

0/0

I know this is an old thread (over a year old!), but I thought I would post a quick and easy solution to the problem presented...just in case someone stumbles upon this thread.

I spend a lot of time trying to get this to work, but it all came down to using the correct menu control event.  Here's the code:

Protected Sub topMenu_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles topMenu.MenuItemDataBound

If Not SiteMap.CurrentNode.ParentNode Is Nothing Then

If e.Item.Text = SiteMap.CurrentNode.ParentNode.Title Then

e.Item.Selected =

True

End If

End If

End Sub

Basically all you have to do is force the parent item to be selected while each menuItem is being DataBound to the control.  This will work in a single menu, using dynamic drop downs, or a split two menu approach.  I was using both methods.  The single method was for a main public website with only top menu control.  The split method used a horizontal top menu with a vertical left menu for an admin site.

I hope this helps someone else out, and I hope that Microsoft decides to make this functionality available via a property in the near future.

Dan Thayer

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Dreamweaver CS3 Bible: Master Every Aspect of Dreamweaver - Work with CSS, Text, Images, And Links - Incorporate Flash Movies and Other Media Authors: Joseph W. Lowery, Pages: 1112, Published: 2007
The Concordance Database Manual Authors: M. Alan Haley, Pages: 368, Published: 2006
Tailoring IntelliCAD Authors: Ralph Grabowski, Pages: 0, Published: -1
Quattro Pro 3.0 Handbook Authors: Mary V. Campbell, Pages: 875, Published: 1991
Dynamics: Numerical Explorations Authors: Helena Engelina Nusse, James A. Yorke, Brian R. Hunt, Eric John Kostelich, Pages: 608, Published: 1998
The Handbook of Software for Engineers and Scientists Authors: Paul W. Ross, Pages: 1557, Published: 1996
Developing and Implementing Windows-based Applications with Visual Basic .NET and Visual Studio .NET Authors: Kirk Hausman, Kalani Kirk Hausman, Mike Gunderloy, Ed Tittel, Pages: 544, Published: 2003
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005

Web:
Joomla! Help Site - Add Menu Item: Component Parent Item: Select the existing Parent Item to which this Menu Item is to be attached to. By default this is Top. Top is the Menu itself. ...
Joomla Templates, Components and Free Downloads for Joomla CMS ... Select the menu you wish to set up parent / child relationships in. ... This is where you will assign a parent item, thus making the menu item we are ...
Bug ID: 6544309 PIT:Unable to select the item's in 'input method ... I can able select the items only through mouse.Even Esc key is also not working for dispose the popupmenu. Focus is not gaining to popup menu from parent ...
House menu parent and child items > Forums > House of Nuke When I select a child item the parent item gets deselected. ... Another problem of mine is that the Admin and Host menu items are not ...
1.2. Select menu It is also possible to explicitly do so by typing Esc+Esc. Menu items:. Select Parent. Selects parent of currently selected node. ...
Joomla i Norge - Norske hjelpesider - Menu Item: Wrapper **NEW** Parent Item: Select the existing Parent Item to which this Menu Item is to be associated. By default this is Top. Top is the Menu itself. The Menu Item will ...
How to hide "Navigation" menu as a possible parent menu | drupal.org '#description' => t('The maximum depth for an item and all its children is fixed at !maxdepth. Some menu items may not be available as parents if selecting ...
Edit menu items - blank, self, parent or top - Web Hosting Please Select. Customer Support Help Desk ยท Submit A Support Ticket ... Question Edit menu items - blank, self, parent or top ...
Mambo open source CMS Knowledgebase / Menu Item Format: Link ... Parent Item: Select 'Top' if you want the Menu Item to appear at the same level as your primary navigation. You can also put the Menu Item under an existing ...
MenuItem Will Not Select - ASP.NET Forums MenuItem Will Not Select. Last post 08-31-2007 12:56 PM by aramka. .... the mouse on the parent node, it will expand all the child item, ...

Videos:
BBC SIMON IS MY INSPERATION Obaid Karki Outcast Spinoziste Pantheon Hexalingual Automath Former UAE Under Secretary Independant Street-Knowledge Urban Talkshow Guru. Unaffiliate...
Mac OS Automator: Doing things over and over is over. Google TechTalks June 27, 2006 Sal Soghoian ABSTRACT Mac OS X "Tiger" introduces Automator, a new application that automates anything on your compu...
The Paradox of Choice - Why More Is Less Google TechTalks April 27, 2006 Barry Schwartz
Long Beach City Council Meeting Long Beach City Council Meeting
Epic RPG Saga Ep 9 Full The Adventure finally begins for Zinc but will he take the advice from his parents? .........Nope! Watch as he learns the hard way. Thaneros notes:...
PowerPoint: Project Part Three Episode 17 (of an 18-part series). This Nortel LearniT tutorial completes the profiled project used throughout the tutorial series.
Wedding Video Introduction, by Cherrywood Productions Wedding Video Your wedding day is one of the most important days of your life and a wedding DVD is an excellent way to capture the day for future me...
Mat & Naomi's Wedding Video, by Cherrywood Productions Wedding Video Your wedding day is one of the most important days of your life and a wedding DVD is an excellent way to capture the day for future mem...
myHotelVideo.com presents: Hotel JW Marriott Phuket Resort & Spa in Mai Khao Beach / South Thailand / Thailand More @ http://myhotelvideo.com/de/landingpage/youtube/resourceid/Mhv_Catalog_Offer::27746 Location: This luxury hotel is located on peaceful Mai Khao...
Just Married by Cherrywood Productions Wedding Video Your wedding day is one of the most important days of your life and a wedding DVD is an excellent way to capture the day for future mem...




Search This Site:










.net framework 1.1 assistance

where is the option for solution-wide find.

ordb & dnn

dnn site resource directory

multi-programmer development tips?

what is an 'objectqualifier'?

customizing the asp.net calendar

hidden .net control with postback?

problem with onbeforeunload on masterpage

issue 8 with 18 dotnetnuke videos - css skinning - (114 videos in total)

dnn guide

postback script errors and conflicts between modules

portalsettings issue...

the file could not be loaded into the web designer form

admin tabs skins

vs.net 2003 professional

non core modules version 3 : blog + forum trouble.

adding ssl to asp.net install package

http vs https

vwd crashes every time i modify css file

need help

menu control in master page does not get styles in ie 6.0

gemini dnn integration

logout security feature

custom membership provider some problem

control events inside a loginview control

error saving a bitmap

3.0.12 "view on-line help" setting

where is the layout menu in vwd 2008 ?

how to display an image

 
All Times Are GMT