Last post Nov 09, 2005 03:25 PM by AspForumTanya
Oct 31, 2005 03:29 PM|AspForumTanya|LINK
I have a problem with Request.ServerVariables("HTTP_REFERER")
I have 4 different places from which user can come on my utility page "pageUtil.aspx"
The URL is almost the same http://Computer/Folder1/Folder2/
"Folder1" is different for those 4 places.
Now, when user comes to my pageUtil.aspx from each place I would like to grab URL using
Request.ServerVariables("HTTP_REFERER") and have a link on my pageUtil.aspx
If the user wants to return back he/she returns on the same page where they came from.
In this case I tried first using Request.ServerVariables("HTTP_REFERER") which didn’t work.
What happened was the first time through I got - "nothing" in
GetURL = Request.ServerVariables("HTTP_REFERER")
Second time through I got the URL of the page pageUtil.aspx
So for some reason HTTP_REFERER didn't want to take the URL of the previous page like it’s suppose to.
I was watching it and realized that first time trough the is nothing in there (almost like a skip)
In the beginning I thought it was like that because I was testing pageUtil.aspx separately. There would be no URL
but then I tested it from links.
Still the same.
I tempararly soleved the problem passing the parameter but I still would like to know the answer as I would be using
Oct 31, 2005 04:10 PM|bmains|LINK
Try the Request.UrlReferrer object, which has several properties to get at the name.
Nov 02, 2005 02:58 PM|AspForumTanya|LINK
This really helped, I already made all nes. changes and everything works fine.
But then what is the different between
GetURL = Request.UrlReferrer.ToString()
Nov 07, 2005 08:46 AM|bmains|LINK
Nov 09, 2005 03:25 PM|AspForumTanya|LINK