473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

disabling links in a menu based on current page?

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:HiddenFieldelement 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...
Nov 16 '07 #1
0 846

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: CJM | last post by:
I need a vertical menu with maybe 10 links on it. The menu will run the full length of the screen, and will consist of 10 large boxes with large-ish text for the links. These links need to be...
7
by: Chris | last post by:
I'm using eight links listed horizontally as a menu on my site. I'm using font-variant:small-caps and they are padded so that they mimic buttons. My gripe is with the way IE handles the focus...
3
by: PB | last post by:
What is the rationalle for disabling JavaScript. AFAIK, the primary reason is for "security purposes" - but what specific kind of threats does the protect against? AND - is the disabling of...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
12
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation...
2
by: Nino | last post by:
Hello, I have done some searching through groups and haven't found an answer that suits my needs, so I hope to ask again. Is there a way to disable an anchor tag within HTML? Here's why: I...
4
by: jsd219 | last post by:
I am a newbie for sure; problem, I have a page that has dynamically generated sections at the top, when I click on one of the sections I would like the list of categories associated with the...
5
by: Dilip | last post by:
I have written a C# based console application. Due to some issues thats been causing me endless nightmares, I was wondering, is there a way to prevent right mousebutton clicks on my application...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.