Css - Menu Control - Keeping Parent Item Selected?
Jul 22, 2010
I have two ASP.NET Menu controls on a page. One in my header (tabs) for top level pages, e.g. ~/Default.aspx
And one in my sidebar for sub pages, e.g. ~/Products/SomeProduct.aspxI'm using the selected CSS class to ensure that the selected tab is a different colour.Works fine for top level pages, but if I view a sub page, the tab isn't assigned a CSS class of selected.How can I ensure that the top level menu item has a CSS class of selected when viewing a sub page?
I am using frames in my webpage.in one of the frames i have a menu control whose items are database driven.when click on the menu item, i want another page to be displayed in other frame.
now i want to pass the the selected menu item text to the other page using session variable which is in the menu item click event method.but the thing is when i click on the menu item, the click event is not firing.
is there any better way to pass the selected menu item text to the other page?
I've been trying to find an easy way of highlighting the current selected menu item of an asp.net menu (so the user knows which page they are on), but no matter what I have tried I can't get it to work. In my markup I have:
I'm trying to style an asp:Menu, so that when I hover over a child menu, all the parent menu's will have the background mouse over selected colour. (Take a look at the win xp start menu for example, with default theme blue, all parent menu's will be highlighted as blue if a child is selected) At first I thought this was something simple, but after intense researching (google), I am beginning to wonder...
I have created my menu items using web.sitemap, asp:sitemapdatasource control and asp:menu control. I'd like to programmatically remove some of the parent menu's based on certain conditions (I'm guessing it will be under the MenuItemDataBound event).
I know how to remove child menu items, not sure how parent menu items can be removed.
I'm trying to find out if or how it's possible to keep the MenuItems highlighted of a menu control as you navigate down the hierarchy.If I have deep menu, say 3 layers, I'd like to keep the path the user took highlighted.
i am using asp:menu for showing the menus in masterpage. If i click the menu item 1, the corresponding page is loading in the content page. I need that the selected Menu item should be highlighted by some color.
I have a master page (Site.master) with a navigation menu linked to a datasource (Master.sitemap). I have a nested master page that has another navigation menu. For any item clicked in this nested navigation menu, I want a particular menu item in the Site.master navigation menu to be selected.
Here's my Site.master menu: [Code]....
In my Site.master.cs I have this: [Code]....
In the nested master page, Products.master I have this: [Code]....
In the Products.master.cs file I try to change the selected item. [Code]....
The master navigation and products navigation menus work just fine by themselves. But when I've tried to set the selected item of the master menu in the Page_Load above, I can't seem to access it. What I've found in trying to do this is the NavigationMenu seems to be uninitialized. The menu Items list is empty. What am I missing here? Why are there no menuItems in the Master.NavigationMenu control?
I want to apply a css class to the level 1 menu item (parent) when it or any or it's children are selected. I've looked at MSDN documentation and any number of examples and walkthroughs but I haven't come up with a way of managing this. I was thinking something like this might work but the style is not being applied to the parent. To further complicate matters, if I try to apply a css style to StaticSelectedStyle it doesn't pick it up at all.
Does anyone know how to set a selected asp.net dynamic menu item to false? I have multiple menus and when someone selects an item from one of the dropdown menus it changes color. If I were to select an item from a different menu I need the other menus not to have the selected option anymore.
I am working with asp.net 2.0 I have 1 problem Regarding Menu Control I used menu control in Master page. Now I have to find out Menu Item from Menu control depending on Condition. how to do that on server and Client side.
I'v been looking for ages on how to get the current selected menu item into a label. so for example on the menu you have home and about, if i click on about it will but the text "About" in the labels text whats in the body of the form. You could say its a sub heading and i would like to do this in c# ;) somthing like this:
lblHeading.Text = Menu1.Page.Title.ToString(); except this retutns the tabpage title not the actual menu item i selected.
how to change the background color of a selected menu item? The background color changes on the word of the dropdown menu but not the entire row section of the menu item. Each menu item has a different word length but I want the background color length to be consistent throughout the dropdown dynamic menu. I also what to change the background parent when a menu item is selected.
I am using frames in my webpage.in one of the frames i have a menu control whose items are database driven.when click on the menu item, i want another page to be displayed in other frame. now i want to pass the the selected menu item text to the other page using session variable which is in the menu item click event method.but the thing is when i click on the menu item, the click event is not firing. is there any better way to pass the selected menu item text to the other page?
I tried using the the New ASP.NET Default Web Template in Visual Studio 2010 but one issue I'm encountering is with the CSS selected menu item and read apost which stated that...
"This screenshot demonstrates some of the styling options provided by the CSS, including the style for the selected About menu item"...In the screenshot the "About Us" menu item is highlighted but the page's content is the "Home" page content, not "About Us" page. My problem is...I can't get the selected item to be highlighted as in the screenshot even with fresh site using the built in template.
I am trying to show the user of my application that when they click on a menu item that their selection gets shown by changing the background color of that menu item
I am using the default menu that comes with asp and is contained in the site master. the default CSS for the menu has a hover and active properties but only the hover works.
I´m using a treenode´s selected node´s value to filter a an accessdatasource which populates a gridview.However when I press the "edit" button in the gridview, I guess the node is undselected because the gridview gets emptied. When I reselect the node, the gridview displays the filtered records, and the one being edited is in edited mode.So I´d like to keep the node selected. Not only because of the above, but also so the user can see what he is editing.Fuga.edit: When I remove the filtering from the accessdatasource init event, the gridview diplays all records, but the worng one is being edited. I guess it´s the one with the same index as the filtered record. So, visual studio gets the index and then reloads the data and applies the index on the reloaded data!?
I have a screen where on filter icon click on a column i need to show a popup screen or a div looks like popup and in which will have list of check boxes with distinct values of all rows of column one (i.e. the data of popup is like below). All these check boxes are dynamically generated controls.
When user click on any of the above check boxes the parent grid should get refreshed with the filtered data and popup or div tag looks like popup should stay and should not be closed. How do i do this?
How to refresh my parent page details by keeping my child div tag open or child window open? What is better approach whether to create server side div tag or a modal popup window?