Rank: Newbie Groups: Member
Joined: 7/20/2010 Posts: 1
|
I have a Master Page with a menu. By default, the menu is disabled. If a user is successfully logged in then I want to enable the menu. How do I access the menu Items from the master page and enable the. Also, do I need to import your Namespace in my program ? I am using VB.NET as my programming language.
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The namespace doesn't matter here, you can go with or without it (without namespace you would just use the full name). What matters is you need to be able to access your master page in a typed manner (check ASP.NET @MasterPage directive) and then make the menu accessible on your master page object (by default the control members are protected, so outside code can not access them). Once you have both you would just use something like "Page.MasterPage.Menu1" to access the menu.
If you still have any questions, you can search online about how to access controls in a master page. This is a rather generic ASP.NET programming question that really doesn't have anything to do with us.
Thanks
|