tags:

views:

259

answers:

2

Hi,

I am developing a navigation bar for the top of a website. One of the interesting things I noticed about the sites original was that when you had navigated to a location, the link would no longer be a lnk. The prior developer achived this with a lot of code and variables floating around, I am just wondering if there is a much simpler way to do this in .net or css. So if a link has been visited i.e. you clicked the link and have been taken to the target page, the link is no longer a link, you can't click it, no mouse change etc.

Thanks, R.

A: 

There are plenty of ways to do this - the simplest I can think of is to have a little chunk of Javascript that searches the entire navbar for links to the current page and strips out the anchor tags.

JoshJordan
If you want a more ASP.NET-y solution, post some code showing what your nav bar looks like.
JoshJordan
+1  A: 

yes, you can do this with CSS

http://www.ewebarchitecture.com/tip.php?id=356

CSS should really be handling this because it is a navigation styling issue.

good luck.

Robert Greiner
It works when you just want to show the current page, but how will CSS disable the link/remove the href-attribute? That has to be done in some other way, like JS or C#.
Jesper Karsrud