Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:41 PM
Adam Knight
Guest
 
Posts: n/a
Default Current Page !

Request.ServerVariables("SCRIPT_NAME") returns the current page being
executed along with the directory it exists in.

I want to simply return the current page being executed without directory
information.
Is their a server variable i can use to returns that page only. Otherwise,
must i use left function to extract the script portionof the value returned
by i Request.ServerVariables("SCRIPT_NAME") ???

Any thoughts about this..

Help appreciated !!!
AK


  #2  
Old July 19th, 2005, 01:41 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: Current Page !

Adam Knight wrote on 08 jun 2004 in
microsoft.public.inetserver.asp.general:
[color=blue]
> equest.ServerVariables("SCRIPT_NAME") returns the current page being
> executed along with the directory it exists in.
>
> I want to simply return the current page being executed without
> directory information.
> Is their a server variable i can use to returns that page only.[/color]

No.

This will show you all your servervariables:

<% For each d in Request.ServerVariables %>
<%=d%>
=
<%=Request.ServerVariables(d)%>
<br>
<% Next %>
[color=blue]
> Otherwise, must i use left function to extract the script portionof
> the value returned by i Request.ServerVariables("SCRIPT_NAME") ???[/color]

vbs:

url = Request.ServerVariables("URL")

url = mid(url,instrrev(url,"/")+1)

Response.write url

js:

url = Request.ServerVariables("URL")+""

url = url.replace(/.*\//,"")

Response.write( url)




--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #3  
Old July 19th, 2005, 01:41 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: Current Page !

http://www.aspfaq.com/2072

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Adam Knight" <adam.jknight@optusnet.com.au> wrote in message
news:O7SUwKUTEHA.3752@TK2MSFTNGP12.phx.gbl...[color=blue]
> Request.ServerVariables("SCRIPT_NAME") returns the current page being
> executed along with the directory it exists in.
>
> I want to simply return the current page being executed without directory
> information.
> Is their a server variable i can use to returns that page only. Otherwise,
> must i use left function to extract the script portionof the value[/color]
returned[color=blue]
> by i Request.ServerVariables("SCRIPT_NAME") ???
>
> Any thoughts about this..
>
> Help appreciated !!!
> AK
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles