Forum Moderators: open
I'm still new to ASP and I'm not sure if this will be more trouble than it is worth.
Thanks in advance for any advice.
There are a bunch of things you can use to accomplish this:
Request.ServerVariables("SCRIPT_NAME")
Request.ServerVariables("URL")
Request.ServerVariables("PATH_INFO")
I use SCRIPT_NAME as my preference, they all essentially do the same thing.
If the user is on that page, then don't show the link:
<%
if not Request.ServerVariables("SCRIPT_NAME") = "/contact.asp" then%>
<a href = "contact.asp"><img src = "contact_image.gif"></a>
<%
end if%>
Do that for each of your nav links, and you should be all set.
That was much easier than I thought it would be. After trying it out, I decided that I wanted to style the link for the current page differently instead of hiding it altogether. Your suggestion was simple enough that I was able to rewrite it to add a CSS class to the link instead of hiding it.