Click here to Skip to main content
16,012,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i want an example to restrict copy and paste url from one browser to another using sessions or hidden fields or any thing.
Posted
Comments
haisanthosh 11-Apr-14 2:27am    
this code is working only chrome but not Firefox and IE can you solve this problem please

1 solution

Write in Page Load of Each Page


C#
string strPreviousPage = "";
 if (Request.UrlReferrer != null)
   {
    strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
    }
if(strPreviousPage =="")
    {
      Response.Redirect("~/Login.aspx");
     }
 
Share this answer
 
Comments
haisanthosh 10-Apr-14 5:17am    
thanks brother very use full code
haisanthosh 11-Apr-14 2:26am    
it is working only chrome but not firefox and IE can you solve this problem please

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