|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Best way to have multiple pages show up as same selection on menuI'm new to ASP.net 2.0 and am trying to work with the menu control. I've setup a sitemap for my main pages and a menu control on a master page. When an item is chosen on the menu control, that item stays highlighted via my static property. Works just fine. One of my pages consists of a web control with a grid and then needs to show different items from the grid in tabbed pages at the bottom. I was going to create a different page for each 'tab' of data and add the web control with the grid to the top. I would like my menu control to stay highlighted when the pages change to one of the ones that is still part of the group. For example, I would have EditRecordAddresses.aspx, EditRecordMisc.aspx, and EditRecordClasses.aspx. But I want EditRecord to stay highlighted on my menu when I switch between these pages. Could someone give me an idea of best way to do this or direct me to an article ? Thanks! Corleen Carleen,
Here's your idea menuitemdatabound event maybe you could getsomething like this to work. if SiteMap.Provider.CurrentNode.NextSibling.Url = page.Request.RawUrl then e.selected = true. endif Good Luck DWS End If Show quoteHide quote "Corleen" wrote: > Hello > I'm new to ASP.net 2.0 and am trying to work with the menu control. I've > setup a sitemap for my main pages and a menu control on a master page. When > an item is chosen on the menu control, that item stays highlighted via my > static property. Works just fine. > > One of my pages consists of a web control with a grid and then needs to show > different items from the grid in tabbed pages at the bottom. I was going to > create a different page for each 'tab' of data and add the web control with > the grid to the top. I would like my menu control to stay highlighted when > the pages change to one of the ones that is still part of the group. > > For example, I would have EditRecordAddresses.aspx, EditRecordMisc.aspx, and > EditRecordClasses.aspx. But I want EditRecord to stay highlighted on my menu > when I switch between these pages. > > Could someone give me an idea of best way to do this or direct me to an > article ? > > Thanks! > > Corleen The MenuItemDatabound event was the perfect spot. I just did:
If e.Item.NavigateUrl.ToUpper = SiteMap.Provider.CurrentNode.ParentNode.Key.ToUpper Then e.Item.Selected = True End If I love it when problems can be solved with one or two lines of code. Thanks! Corleen Show quoteHide quote "DWS" wrote: > Carleen, > Here's your idea menuitemdatabound event maybe you could getsomething like > this to work. > > if SiteMap.Provider.CurrentNode.NextSibling.Url = page.Request.RawUrl then > e.selected = true. > endif > > Good Luck > DWS > > > > > End If > > "Corleen" wrote: > > > Hello > > I'm new to ASP.net 2.0 and am trying to work with the menu control. I've > > setup a sitemap for my main pages and a menu control on a master page. When > > an item is chosen on the menu control, that item stays highlighted via my > > static property. Works just fine. > > > > One of my pages consists of a web control with a grid and then needs to show > > different items from the grid in tabbed pages at the bottom. I was going to > > create a different page for each 'tab' of data and add the web control with > > the grid to the top. I would like my menu control to stay highlighted when > > the pages change to one of the ones that is still part of the group. > > > > For example, I would have EditRecordAddresses.aspx, EditRecordMisc.aspx, and > > EditRecordClasses.aspx. But I want EditRecord to stay highlighted on my menu > > when I switch between these pages. > > > > Could someone give me an idea of best way to do this or direct me to an > > article ? > > > > Thanks! > > > > Corleen How about using the asp wizard control?
Show quoteHide quote "Corleen" <cjaschn***@yahoo.com> wrote in message news:3973A381-E053-4614-B37F-A682BAE3A02C@microsoft.com... > Hello > I'm new to ASP.net 2.0 and am trying to work with the menu control. I've > setup a sitemap for my main pages and a menu control on a master page. > When > an item is chosen on the menu control, that item stays highlighted via my > static property. Works just fine. > > One of my pages consists of a web control with a grid and then needs to > show > different items from the grid in tabbed pages at the bottom. I was going > to > create a different page for each 'tab' of data and add the web control > with > the grid to the top. I would like my menu control to stay highlighted when > the pages change to one of the ones that is still part of the group. > > For example, I would have EditRecordAddresses.aspx, EditRecordMisc.aspx, > and > EditRecordClasses.aspx. But I want EditRecord to stay highlighted on my > menu > when I switch between these pages. > > Could someone give me an idea of best way to do this or direct me to an > article ? > > Thanks! > > Corleen
CustomValidator is not firing
Checkbox in datagrid.... How to read value of a dynamically created radiobuttonlist control? DataGrid Functionality Questions Checkbox state after postback Dynamic checkbox loses checked state cancel toolbar buttonclick from client-side javascript asp:Repeater + no viewstate + DataBind() ?? Where are the events of the aspx? Looking for graphic control to use in .NET |
|||||||||||||||||||||||