2009-07-08 60 views
2

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..net c#<a href> links, killing link when in correct location

Thanks, R.

回答

0

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.

+0

如果您想要更多ASP.NET-y解决方案,请发布一些代码,以显示导航栏的外观。 – JoshJordan 2009-07-08 22:28:16

1

yes, you can do this with CSS

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

CSS应该真的处理这个,因为它是一个导航样式问题。

祝你好运。

+0

它只适用于显示当前页面,但CSS如何禁用链接/删除href属性?这必须以其他方式完成,如JS或C#。 – 2009-07-09 21:39:33

相关问题