| re: Get page name without folder details
If Right(request.serverVariables("url"),
Len(request.serverVariables("url"))-InStrRev(request.serverVariables("url"),
"/")) = "messages.asp" then
"Colin Steademan" <msdn@N0Tpart0FemailADDRESScolinsteadman.com> wrote in
message news:90E24EB1-BDC0-4F63-A003-82EF6849B1F8@microsoft.com...[color=blue]
> Is there a method of returning the name of the current URL, without any of[/color]
the path details? I am currently using request.serverVariables("url"), but
this returns the name of the page and its path. This is forces me to use
the following IF statement to get my page to work correctly :[color=blue]
>
> <%
> If request.serverVariables("url") = "/pp/DEV/messages.asp" Then ...
> %>
>
> This works fine. But since the URL is hard-coded, when I move my[/color]
development pages to live I am forced to go in and change the script (and
others) as follows:[color=blue]
>
> <%
> If request.serverVariables("url") = "/pp/LIVE/messages.asp" Then ...
> %>
>
> I've looked at the other serverVariables available but none seem to just[/color]
return the name of the page. Can anyone suggest a remedy for this?[color=blue]
>
> TIA,
>
> Colin
>[/color] |