Menu - Current item and parent item selected?

I have a sitemap menu and I'd like to have both the parent and the current item show as selected. I tried to do this with the OnMenuItemDataBound event, but when I select the parent, the current item doesn't display as a selected item. It seems like only one item in a menu can be displayed as selected at any given time.  The menu is in a master page and is set to display the parent level of the item clicked as the base level. Am I missing something? Any Ideas?

 

Thanks,

 

0
martialmedia
6/18/2007 8:20:28 AM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

4 Replies
935 Views

Similar Articles

[PageSpeed] 46

Do you mean something like this  ?

Home>>Messages   

where you are currently at Messages.aspx .

 

If yes, you can use SiteMapPath control.

look at this http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/navigation/sitemappath.aspx for an example.

0
gridview
6/19/2007 12:04:19 AM

 Hi,

I think you can  have a try to use the Menu Adapter from the collection of ASP.NET 2.0 CSS Friendly Adapters

You may be interested in it! 


Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Amanda
6/21/2007 3:34:18 AM

Thanks for your response. Interesting stuff.

0
martialmedia
6/21/2007 4:54:59 AM

Thanks for responding. I'm needing to do it with the menu and the site map.

0
martialmedia
6/21/2007 4:57:16 AM
Reply:

Similar Artilces:

how to show the first menu item as the selected menu item in a "Menu control"
Hello Mate,    i have made a tab control using the menu control and the multi view control. all i need is, how can i show the first menu has been selected when my web page got run.   thanks in advance,Myself  Much Obliged & Thanks a Lot,Myself Sidewinder2: i have made a tab control using the menu control and the multi view control. all i need is, how can i show the first menu has been selected when my web page got run. Hi Sidewinder2, Why not use the Tabs control?  Also you can refer this link to solve your problem, http://www.getdotnetcode.com/...

Menu Control
Hi everyone, Im developing an application in Asp.net 2.0 by using menu control (in a user control).In which each menu item navigates to a new page. Now i want to apply different setting(For eg. Changes Forecolor) of selected Menu Item but the problem im facing is whenever i navigate to the new page the user control is reloaded and im unable to get the selected menu item. I can't use session or viewstate in my application. Thank u. Are you using MasterPage? If you put Menu control into the MasterPage and if the two content page you switches are both create from the same MasterPage,...

Menu Item, Selected Item, and Site Map controls
Ok no code here, actually looking for some.  I've created a Menu and when I click on the link to go to another page, even if I set the Static and Dynamic Selected Item to another style (changing a color, whatever) it doesn't change.  Do I have to do this programmatically?  If so, can someone give me some sample code to use? Also I've noticed the SelectedItem works fine when I bind the menu to a Site Map, however I haven't been able to set up the Site Map to not have the first layer of navigation.  Example:  If you have a website that has a "Home...

Removing a menu item for the menu item control
In a menu control I have several items In the Menu1_Load event I want to conditionally remove a menu item.I use the codeMenu1.Items.RemoveAt(4). How do I test for the existence in the menu item at index 4 before removing it??Thanks Hi, You can compare Menu1.Items[4].Text against the title of the node. Yes but if it was removed earlier then the code will error out. So I need to test for the existence of Menu1.Items(4). If it exists then remove it. craigbtx: In a menu control I have several items In the Menu1_Load event I want to conditionally remove a menu item.I use the codeMe...

HowTo control menu items max display level per parent item basis
 Hi. Suppose i have the following menu structure a shown in the code below: (just part of...)...       <siteMapNode url="~/.../Default.aspx" title="Company" description="Company">         <siteMapNode url="~/.../Search.aspx" title="Search" description="Search"  />       </siteMapNode>       <siteMapNode url="~/.../Default.aspx" title="Father" description="Father...

How to display the more than one row with items and buttons in gridview control. when i select three items at same time from categories(Fruits, Apples, Gifts). The selected items are displayed in g
Hi,when i select three items at same time from categories(Fruits, Apples, Gifts). The selected items are displayed in gridview.Here i would like to change this way "when i click more than one category at same time. it should be display selected item and button."For example: if i have to select Fruits, Apples from categories.  it should be display like 1st "row have Fruits and In 2nd row have Apples and button" in gridview.the button have some event.How can i do it? Please can anyone answer me.With kind requestThanks your query is very raw..can u details it out...Pl...

Menu control keep menu item selected
Hi Everyone, I've been using the menu control for navigation within my application using the web.sitemap, everything works fine except when I click on a hyperlink within the page, the selected menu item within the menu control is no longer selected. Is there a way to keep the menu item selected even though I click on a hyperlink within the page? Not sure if this is a good solution, but I was thinking to store the current node within a viewstate and then retrieve on the nect page load (not sure if this will owrk, it's just a theory). Thanks, IJ   IJ,   Since you are clickin...

Menu item + submenu item selected
HiI have an ASP menu and  submenu items under it. When any submenu item  is selected, i want the main menu item to be color highlighted with red.Does any body know about the ASP menu's .Please let me know?Thanks      Check out this link.  It basically discusses this. Hi, You want to make the selecteditem's parents have  the same style as selecteditem, right? You can check this thread: http://forums.asp.net/t/1204948.aspx   Hope it helps.Amanda WangMicrosoft Online Community SupportPlease remember to mark the replies as an...

How to keep parent menu item hover style while hover on its sub menu item?
when you hover on a menu item, it shows StaticHoverStyle and it's sub menu is shown. and user will go on hover to sub menu item, it shows DynamicHoverStyle. but this is when the StaticHoverStyle goes off. I want to keep it while user is navigating it's submenu. is there anyway to do so? maxi_ng: when you hover on a menu item, it shows StaticHoverStyle and it's sub menu is shown. and user will go on hover to sub menu item, it shows DynamicHoverStyle. but this is when the StaticHoverStyle goes off. I want to keep it while user is navigating it's submenu. is there a...

How to show higher level menu item selected when one of its submenu items selected?
I have a menu with a mix of static and dynamic items. I have the static item-only backcolor change when it is selected but I would also like the other static items backcolor to change when one of its submenus is selected. How to do this? Hi, Do you want to highlight the parent menuitems when the submenu is selected? You can try to refer this codeproject article: http://www.codeproject.com/KB/webforms/AspMenuParentHighlighting.aspx Hope it helps.Amanda WangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help...

Programmatically set the selected menu item in the Menu control
Is it possible to set the selected menu item in a Menu control programmatically? If so, how? It is possible set the selected menu item in design mode (see code below), but I can't find a way to do the same programmatically.<asp:Menu id="mnuLanguage" Orientation="Horizontal" CssClass="tabs" OnMenuItemClick="mnuLanguage_MenuItemClick" Runat="server">    <Items>        <asp:MenuItem Text="Tab 1" Value="0" Selected="true" />     &n...

Selecting parent menu item
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! 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.--Dannydisclaimer: Information provided is 'as is' and conveys no warranties or guarantees. I know this is an old thread (over a year old!), but I thought I would post a quick and ...

menu control selected item
hi all, i have a problem with a manu control which set dinamically his Items NavigateUrl. I want a textbox control in my page shows the title of the selected item  It works perfectly only if the nodes int the web.sitemap have the attribute default set to empty string otherwise the textbox show the title of the last node with defalut attribute set to empty string. I tried to set the textbox in the NavigationBar_PreRender or page_load and quite in all possible event but nothing... any suggests? thanks a lot the menu and the textboxcontrol: <asp:TextBox ID="Titolo" ...

Controlling how many menu items appear in the menu control
Hi I have a menu control which is bound to the web.sitemap. I want to be able to control how many static menu items can be displayed in the menu. I have the home button showing with other buttons too i.e. staticdisplaylevels=2. But how do I say for example to only show the first 6 main sitemap nodes to go in the menu so that there are only 6 menu items to chose from even though there are more defined in the sitemap. Thanks in advance. You can use the MenuItemDataBound event and hide the menu's you don't want to show to the user Alternatively you can add a custom attribute (visible="false"...

How to have the datalist item to be selected by clicking an item of the datalist item?
I would like to to have a datalist item to be selected by clicking an item of  the data list item. I have tried the following code but no go. pls help me. Its urgent.if (e.Item.ItemIndex == -1) return;e.Item.Attributes.Add("onmouseover", "this.oldClass = this.className; this.className = 'mouseOverStyleGridview1'"); e.Item.Attributes.Add("onmouseout", "this.className = this.oldClass;");e.Item.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(DataList1, "Select$" + e.Item.ItemIndex.ToString()))...

Web resources about - Menu - Current item and parent item selected? - asp.net.navigation-controls

Portal:Law/Nominate/Selected article - Wikipedia, the free encyclopedia
Add the article in to a subpage of this portal, such as Portal:Law/Selected article/# , replacing the "#" with the number above the current highest. ...

F8: Facebook’s FbStart Initiative Will Give Selected Developers A $30K Kick-Start
... successful applications is likely a whole lot easier with $30,000 in free tools and services to start off with, and that’s exactly what selected ...

LEGO Shop - The LEGO Technic team has selected the winner... - Facebook
The LEGO Technic team has selected the winner of the Co-Creation Challenge! LEGO will be producing a limited run of 20,000 of this stunning set.... ...

baby365- Grand Doctor Ma Selected Students for iPad on the iTunes App Store
Get baby365- Grand Doctor Ma Selected Students on the App Store. See screenshots and ratings, and read customer reviews.

Selected Cheney Vice Presidential Photographs
... for photos found within these albums are Paul Morse, Karen Ballard, Kimberlee Hewitt, Shealah Craighead, and Chris Greenberg. These selected ...

[iOS Advice] How To Clarify Your Email Replies By Quoting Selected Text - YouTube
Follow me on Twitter: http://www.twitter.com/macmixing Like my Facebook page: http://www.facebook.com/macmixing RATE, COMMENT, SUBSCRIBE! :-) ...

Sait Faik Abasıyanık’s Selected Stories are tales that beguile all for their brevity
The influential Turkish writer's collection of short stories is often bizzare but never boring.

Animal of the Day: Lucius Has Been Selected as the U.K.’s ‘Happiest Cat’
He’s got one blue eye, one green eye and a heart of gold. British mobile phone company O2 recently held some “cat auditions” to find “the UK’s ...

Michael Sam becomes first openly gay player selected in an NFL Draft
Defensive end Michael Sam of the University of Missouri became the first openly gay player to be selected in a National Football League Draft ...

Refugee spinner selected for PM's XI
Fawad Ahmed has gone from asylum seeker to rubbing shoulders with Julia Gillard at The Lodge.

Resources last updated: 11/24/2015 9:51:43 PM