|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
newbie: asp.net 2.0 menu problemasp.net 2.0 I'm using 2 menus in my webportal project. One menu is the main menu, and a sub-menu shows menu item dependent on what is the selected menu item in main menu. I followed this example on MSDN: http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx This works.... But here is my PROBLEM: I've got a webpage which is not accessible from the menu. But when this webpage is displayed I want the sub-menu to display menu items related to this webpage. I don't know how to do this, because no events in the main menu is triggered. Any suggestions? Jeff can you not leave populate the second menu programmatically depending
on what page it's on? leave the items menu free, then depending on the page add menu items using your codebehind like this. Dim itmMenuItem1 As New MenuItem("Menu item text", "menuitemvalue", "imageurl", "navigateurl") menu1.items.add(itmMenuItem1) you can also declare a menu item and add it as a child of another item like this Dim itmMenuItem2 As New MenuItem("Menu item text", "menuitemvalue", "imageurl", "navigateurl") itmMenuItem1.ChildItems.Add(itmMenuItem2) does this make any sense? Jeff wrote: Show quoteHide quote > hey > > asp.net 2.0 > > I'm using 2 menus in my webportal project. One menu is the main menu, and a > sub-menu shows menu item dependent on what is the selected menu item in main > menu. > > I followed this example on MSDN: > http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx > > This works.... > > But here is my PROBLEM: > I've got a webpage which is not accessible from the menu. But when this > webpage is displayed I want the sub-menu to display menu items related to > this webpage. I don't know how to do this, because no events in the main > menu is triggered. > > Any suggestions? > > Jeff I guess I could use it, but I would prefer to have it set in my .sitemap
file. I forgot to mention that this is webpage and 4 other pages should have the same sub menu...: example sub menu items: Product Page: <this is the page I mentioned in my previous post> Prices: Location etc And if the user clicks on any of those menu items (mentioned above), a related page should appear. But the sub menu should still be the same. Any suggestions? Jeff Show quoteHide quote "tfsmag" <tfs***@gmail.com> wrote in message news:1153334837.198744.19670@i3g2000cwc.googlegroups.com... > can you not leave populate the second menu programmatically depending > on what page it's on? leave the items menu free, then depending on the > page add menu items using your codebehind like this. > > Dim itmMenuItem1 As New MenuItem("Menu item text", > "menuitemvalue", "imageurl", "navigateurl") > > menu1.items.add(itmMenuItem1) > > you can also declare a menu item and add it as a child of another item > like this > > > Dim itmMenuItem2 As New MenuItem("Menu item text", > "menuitemvalue", "imageurl", "navigateurl") > > itmMenuItem1.ChildItems.Add(itmMenuItem2) > > does this make any sense? > > Jeff wrote: >> hey >> >> asp.net 2.0 >> >> I'm using 2 menus in my webportal project. One menu is the main menu, and >> a >> sub-menu shows menu item dependent on what is the selected menu item in >> main >> menu. >> >> I followed this example on MSDN: >> http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx >> >> This works.... >> >> But here is my PROBLEM: >> I've got a webpage which is not accessible from the menu. But when this >> webpage is displayed I want the sub-menu to display menu items related to >> this webpage. I don't know how to do this, because no events in the main >> menu is triggered. >> >> Any suggestions? >> >> Jeff >
Show quote
Hide quote
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:%23rkjPv2qGHA.4632@TK2MSFTNGP05.phx.gbl... >I guess I could use it, but I would prefer to have it set in my .sitemap >file. > > I forgot to mention that this is webpage and 4 other pages should have the > same sub menu...: > > example sub menu items: > Product Page: <this is the page I mentioned in my previous post> > Prices: > Location > etc > > And if the user clicks on any of those menu items (mentioned above), a > related page should appear. But the sub menu should still be the same. > > Any suggestions? > > Jeff > > > "tfsmag" <tfs***@gmail.com> wrote in message > news:1153334837.198744.19670@i3g2000cwc.googlegroups.com... >> can you not leave populate the second menu programmatically depending >> on what page it's on? leave the items menu free, then depending on the >> page add menu items using your codebehind like this. >> >> Dim itmMenuItem1 As New MenuItem("Menu item text", >> "menuitemvalue", "imageurl", "navigateurl") >> >> menu1.items.add(itmMenuItem1) >> >> you can also declare a menu item and add it as a child of another item >> like this >> >> >> Dim itmMenuItem2 As New MenuItem("Menu item text", >> "menuitemvalue", "imageurl", "navigateurl") >> >> itmMenuItem1.ChildItems.Add(itmMenuItem2) >> >> does this make any sense? >> >> Jeff wrote: >>> hey >>> >>> asp.net 2.0 >>> >>> I'm using 2 menus in my webportal project. One menu is the main menu, >>> and a >>> sub-menu shows menu item dependent on what is the selected menu item in >>> main >>> menu. >>> >>> I followed this example on MSDN: >>> http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx >>> >>> This works.... >>> >>> But here is my PROBLEM: >>> I've got a webpage which is not accessible from the menu. But when this >>> webpage is displayed I want the sub-menu to display menu items related >>> to >>> this webpage. I don't know how to do this, because no events in the main >>> menu is triggered. >>> >>> Any suggestions? >>> >>> Jeff >> > > Hi Jeff,
What was the solution? Other developers google the groups for their research. If you figure out a problem on your own like this, instead of just posting CASE SOLVLED (which is considerate of you because you are notifying potential helpers so they don't waste their time), you might also summarize how you solved it and thereby help some desperate developer who got to your post through google and who has the same problem and wants to know how you did it. Steve Show quoteHide quote "Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message news:uJvX8pJsGHA.372@TK2MSFTNGP06.phx.gbl... > > "Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message > news:%23rkjPv2qGHA.4632@TK2MSFTNGP05.phx.gbl... >>I guess I could use it, but I would prefer to have it set in my .sitemap >>file. >> >> I forgot to mention that this is webpage and 4 other pages should have >> the same sub menu...: >> >> example sub menu items: >> Product Page: <this is the page I mentioned in my previous post> >> Prices: >> Location >> etc >> >> And if the user clicks on any of those menu items (mentioned above), a >> related page should appear. But the sub menu should still be the same. >> >> Any suggestions? >> >> Jeff >> >> >> "tfsmag" <tfs***@gmail.com> wrote in message >> news:1153334837.198744.19670@i3g2000cwc.googlegroups.com... >>> can you not leave populate the second menu programmatically depending >>> on what page it's on? leave the items menu free, then depending on the >>> page add menu items using your codebehind like this. >>> >>> Dim itmMenuItem1 As New MenuItem("Menu item text", >>> "menuitemvalue", "imageurl", "navigateurl") >>> >>> menu1.items.add(itmMenuItem1) >>> >>> you can also declare a menu item and add it as a child of another item >>> like this >>> >>> >>> Dim itmMenuItem2 As New MenuItem("Menu item text", >>> "menuitemvalue", "imageurl", "navigateurl") >>> >>> itmMenuItem1.ChildItems.Add(itmMenuItem2) >>> >>> does this make any sense? >>> >>> Jeff wrote: >>>> hey >>>> >>>> asp.net 2.0 >>>> >>>> I'm using 2 menus in my webportal project. One menu is the main menu, >>>> and a >>>> sub-menu shows menu item dependent on what is the selected menu item in >>>> main >>>> menu. >>>> >>>> I followed this example on MSDN: >>>> http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx >>>> >>>> This works.... >>>> >>>> But here is my PROBLEM: >>>> I've got a webpage which is not accessible from the menu. But when this >>>> webpage is displayed I want the sub-menu to display menu items related >>>> to >>>> this webpage. I don't know how to do this, because no events in the >>>> main >>>> menu is triggered. >>>> >>>> Any suggestions? >>>> >>>> Jeff >>> >> >> > >
Other interesting topics
Gaining access to local files from an ASP.Net page
Update Datagrid Question Call to PageAsyncTask Times Out Every Time Convert to double is country depending. Problem with Content Pages and Seach Capability Covering up a dropdownlist How to share web controls between pages SQLServer Report questions Novice question Firing events for child controls in a DataGrid |
|||||||||||||||||||||||