Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to retrieve current page url?

Reply
Thread Tools

How to retrieve current page url?

 
 
Penny
Guest
Posts: n/a
 
      06-17-2005
Hi all,

How can I retrieve the current page url(and parameters/arguments) using ASP
code?

The current page is an asp search results page so the url includes the page
name and the criterion(sorry I don't know what they're called) I had the
'post' method tag on the end.

I need to get it and store it so I have an easy way of getting back to this
page at a click of a button a few pages down the track. I've tried using
location and history but I'd like to manage it myself.

Any ideas?

Regards

Penny.


 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      06-17-2005
Gazing into my crystal ball I observed "Penny" <>
writing in news::

> Hi all,
>
> How can I retrieve the current page url(and parameters/arguments) using
> ASP code?
>
> The current page is an asp search results page so the url includes the
> page name and the criterion(sorry I don't know what they're called) I
> had the 'post' method tag on the end.
>
> I need to get it and store it so I have an easy way of getting back to
> this page at a click of a button a few pages down the track. I've tried
> using location and history but I'd like to manage it myself.
>
> Any ideas?
>
> Regards
>
> Penny.
>
>
>


Request.ServerVariables("SCRIPT_NAME")

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
 
Ken Jenkins
Guest
Posts: n/a
 
      06-17-2005

Thispage = Request.ServerVariables("script_name") & "?" &
Request.Querystring & Request.Form



"Adrienne" <> wrote in message
news:Xns9677B5734ED0Carbpenyahoocom@207.115.63.158 ...
> Gazing into my crystal ball I observed "Penny" <>
> writing in news::
>
>> Hi all,
>>
>> How can I retrieve the current page url(and parameters/arguments) using
>> ASP code?
>>
>> The current page is an asp search results page so the url includes the
>> page name and the criterion(sorry I don't know what they're called) I
>> had the 'post' method tag on the end.
>>
>> I need to get it and store it so I have an easy way of getting back to
>> this page at a click of a button a few pages down the track. I've tried
>> using location and history but I'd like to manage it myself.
>>
>> Any ideas?
>>
>> Regards
>>
>> Penny.
>>
>>
>>

>
> Request.ServerVariables("SCRIPT_NAME")
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share



 
Reply With Quote
 
Penny
Guest
Posts: n/a
 
      06-17-2005
Thanks guys!!

It all seems so simple to you.

It's not a very intuitive name - ("script_name") - is it!

Regards

Penny


 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      06-18-2005
Gazing into my crystal ball I observed "Penny" <>
writing in news::

> Thanks guys!!
>
> It all seems so simple to you.
>
> It's not a very intuitive name - ("script_name") - is it!
>
> Regards
>
> Penny
>
>


Please understand that this method does not always work. If the user has
referrer logging disabled, then that value will be blank when going to
another page.

From your original post, although you wanted to know the variable for
THIS page, I think you really may be looking for Request.ServerVariables
("HTTP_REFERER") [yes, it's spelled right, apparently it was misspelled a
long time ago, and it has stayed that way], but again, if the user has
referrer logging disabled, it will not work. Also, if someone comes from
another site directly to that page, the HTTP_REFERER will be for the
other site.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to update the current web page? (delete current web page + rewrite the page) laryten@yahoo.com Javascript 3 10-12-2006 07:33 PM
How to retrieve items in GridView on current Page? GS ASP .Net 1 03-03-2006 05:55 AM
Is it possible to retrieve the page object from HttpContext.Current? HaukiDog ASP .Net 0 03-07-2004 07:45 PM
How to retrieve current page name Valerian John ASP .Net 1 08-20-2003 08:35 PM



Advertisments