Click here to Skip to main content
15,921,694 members
Please Sign up or sign in to vote.
3.40/5 (2 votes)
See more:
Hi All,

Good day to you .

I have written a script which consists like:

Consider Site I and Site II.

When i click a HyperLink on Site I it redirect to Site II.

In Site II i want the url of Site I,but when i use UrlReferrer i am getting as NULL.

Could any one help me how can i solve it ?

Thanks in advance.
Posted
Updated 19-Aug-13 22:08pm
v2

Hi,

Request.UrlReferrer can only be used with hyperlinks or anchor tags, not with button redirects or Response.Redirect.

with Response.Redirect the object returns null.

refer these.
Is there any alternative for UrlReferrer and HTTP_REFERRER[^]
ASP.NET - Response.Redirect Not Populating Url Referrer[^]

hope it helps.
 
Share this answer
 
Comments
Thomas Daniels 20-Aug-13 3:34am    
+5!
Karthik Harve 20-Aug-13 3:37am    
Thank you :)
sarang_k 20-Aug-13 4:08am    
Hi I am using HyperLink
Karthik Harve 20-Aug-13 5:54am    
how r u redirecting ? using Navigate URL property or on post back ?
For solving this kind of situation you have to user Server.Transfer("NextPageName"); instead of Responce.Redirect(""); So, when you go from one page to another you will be see that previous page in your URL.


I hope it's working well and helping to you........:-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900