Welcome Guest Search | Active Topics | Sign In | Register

Accessing Menu Items from a Master Page Options
Dennis Francis
Posted: Thursday, August 11, 2011 10:28:18 AM
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
eo_support
Posted: Thursday, August 11, 2011 10:58:38 AM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.