disabling links in a menu based on current page?

S

Sunfire

Is it possible to test for a hidden value (asp:HiddenField) in a page to
determine what link should be disabled? Example would be this: On a page
(AboutUs.aspx for this example), put a <asp:HiddenField> element on the page
and give it an id of "AboutUs". Then in the layout.master page where the
menu is do this in the load event:

switch (AboutUsHiddenField.Value) {
case "AboutUs":
MainMenu.Items[1].Enabled=false;
break;
//...
}

Or is there a better way to do this...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top