My Default.aspx is based on Master Page which has a navigation menu containing sub menus. How do I capture which menu item or sub-menu item user has selected?
make a public property in master page which will be exposing Menu control SelectedItem, then access this property in content page using Master.Property....make sure you reference master page in content page...
moquamar
Member
46 Points
149 Posts
Accessing a Sub-Menu Item of Master Page's Navigation Menu From Content Page
Feb 03, 2013 04:31 AM|LINK
My Default.aspx is based on Master Page which has a navigation menu containing sub menus. How do I capture which menu item or sub-menu item user has selected?
ramiramilu
All-Star
95493 Points
14106 Posts
Re: Accessing a Sub-Menu Item of Master Page's Navigation Menu From Content Page
Feb 03, 2013 08:39 AM|LINK
make a public property in master page which will be exposing Menu control SelectedItem, then access this property in content page using Master.Property....make sure you reference master page in content page...
thanks,
JumpStart
moquamar
Member
46 Points
149 Posts
Re: Accessing a Sub-Menu Item of Master Page's Navigation Menu From Content Page
Feb 03, 2013 05:50 PM|LINK
Could you provide me some sample code, please?
moquamar
Member
46 Points
149 Posts
Re: Accessing a Sub-Menu Item of Master Page's Navigation Menu From Content Page
Feb 04, 2013 04:30 AM|LINK
Let say a public property is created in Master page. How would a content page know that a menu in NavigationMenu is clicked?
manjuby
Participant
1131 Points
251 Posts
Re: Accessing a Sub-Menu Item of Master Page's Navigation Menu From Content Page
Feb 04, 2013 05:34 AM|LINK
asp:Menu ID="ExtraActionsMenu" runat="server" StaticEnableDefaultPopOutImage="false" Orientation="Horizontal" DynamicHorizontalOffset="10" onmenuitemclick="ExtraActions_MenuItemClick">
and then in code behind ExtraActions_MenuItemClick funtion use global variable to store value..
moquamar
Member
46 Points
149 Posts
Re: Accessing a Sub-Menu Item of Master Page's Navigation Menu From Content Page
Feb 04, 2013 05:41 AM|LINK
I am totally lost!