Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 20th, 2005, 01:26 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trapping last url

Hi,
How can I trap the url through which a user was redirected to my page.
I have used history.back(-) but that does not work. So is there any other method to do so?
 
Old April 20th, 2005, 03:22 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Using ServerVariable's HTTP_REFERER property you can trap the URL.

 
Old April 20th, 2005, 06:32 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks but can you send me a sample code for this where I can trap the last url from where the user was redirected.
 
Old April 21st, 2005, 02:43 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Below is the code
string s = Request.ServerVariables["HTTP_REFERER"]








Similar Threads
Thread Thread Starter Forum Replies Last Post
error trapping majones@omaha Classic ASP Basics 0 January 5th, 2006 02:02 PM
Need some error trapping... cpk Classic ASP Databases 4 January 26th, 2005 08:10 AM
Trapping errorerror '80004005' topshed Classic ASP Components 3 October 7th, 2004 10:06 PM
Trapping Close Window in C# YiannisF ASP.NET 1.0 and 1.1 Basics 1 September 6th, 2004 06:06 AM
Trapping all events rajustha Pro VB.NET 2002/2003 1 December 10th, 2003 12:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.