Current Page !

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam Knight

    Current Page !

    Request.ServerV ariables("SCRIP T_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.ServerV ariables("SCRIP T_NAME") ???

    Any thoughts about this..

    Help appreciated !!!
    AK


  • Evertjan.

    #2
    Re: Current Page !

    Adam Knight wrote on 08 jun 2004 in
    microsoft.publi c.inetserver.as p.general:
    [color=blue]
    > equest.ServerVa riables("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.ServerV ariables %>
    <%=d%>
    =
    <%=Request.Serv erVariables(d)% >
    <br>
    <% Next %>
    [color=blue]
    > Otherwise, must i use left function to extract the script portionof
    > the value returned by i Request.ServerV ariables("SCRIP T_NAME") ???[/color]

    vbs:

    url = Request.ServerV ariables("URL")

    url = mid(url,instrre v(url,"/")+1)

    Response.write url

    js:

    url = Request.ServerV ariables("URL") +""

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

    Response.write( url)




    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Aaron [SQL Server MVP]

      #3
      Re: Current Page !



      --

      (Reverse address to reply.)




      "Adam Knight" <adam.jknight@o ptusnet.com.au> wrote in message
      news:O7SUwKUTEH A.3752@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Request.ServerV ariables("SCRIP T_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.ServerV ariables("SCRIP T_NAME") ???
      >
      > Any thoughts about this..
      >
      > Help appreciated !!!
      > AK
      >
      >[/color]


      Comment

      Working...