Forum Moderators: open
I would like to globalize my the tabbed navigation that I am using throughout my website. However, in order to do this it would be necessary to dynamically edit the header file to put the id=current into the current <li> in the <ul> that forms the tabbed css navigation.
I am still very wet behind the ears with ASP and ASP.NET, so I would appreciate if someone could explain to me how to accomplish this.
I'm assuming that the code has to be "aware" of what page is being loaded, and set up a simple if statement based on this
i.e. if page 1 is beign loaded, tab 1 should be highlighted...if page 2 is being loaded...etc etc.
I do not, however, know how to use asp to make the file aware of what page is being loaded.
any help is greatly appreciated
Thank You,
Mike
In ASP, Request.ServerVariables("SCRIPT_NAME") gets you the name of the current page.
Without seeing your code, it's difficult to know if this info helps. You could do this though...
<%
If Request.ServerVariables("SCRIPT_NAME") = "/page1.asp" Then
' Do something
ElseIf Request.ServerVariables("SCRIPT_NAME") = "/page2.asp" Then
' Do something else
End If