Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > disabling links in a menu based on current page?

Reply
Thread Tools

disabling links in a menu based on current page?

 
 
Sunfire
Guest
Posts: n/a
 
      11-16-2007
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...


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling links Terry Javascript 4 09-22-2007 09:29 AM
simple link disabling on current page jonefer ASP .Net Building Controls 0 02-02-2007 11:40 PM
Disabling self links with MenuControl Wayne Erfling ASP .Net Web Controls 0 11-07-2006 03:38 PM
disabling links Robert Smith ASP General 2 07-14-2006 11:45 AM
Newbie DOM Query - temporarily disabling links? howard.jones@gmail.com Javascript 5 06-19-2005 01:23 PM



Advertisments