This is a migrated thread and some comments may be shown as answers.

Determine selected Menu Item from Menu in User Control on Master Page

1 Answer 68 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 13 Dec 2011, 03:43 PM
Hello,
I have a radmenu in a user control that is placed on several master pages.  I would like to be able to determine the selected item from that menu on my content pages.  I found the solution below which works well if the radmenu is placed on the master page.  I would like to avoid having to duplicate the radmenu on all my master pages and am wondering if anyone knows how I could modify this to be able to find the menu from the user control and then determine the selected item.

http://www.telerik.com/community/forums/preview-thread/aspnet-ajax/menu/radmenu-masterpage-and-contentplaceholder-page.aspx
Thanks,
Bob

1 Answer, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 14 Dec 2011, 12:55 PM
Hello Bob,

If you have a control inside a UserControl on a master page, you can access it from the content page with the following line:

RadMenu menu = (RadMenu)((UserControl)Master.FindControl("UserControl1")).FindControl("RadMenu1");
Regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Menu
Asked by
Bob
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or