About Me

My photo
a Dynamic and Energetic guy.....

Tuesday, September 10, 2013

Disable Copy-Paste option of Page URL in C#

if (!Request.FilePath.Contains("Default"))
{
string strPreviousPage = "";
if (Request.UrlReferrer != null)
{
strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
}
if (strPreviousPage == "")
{
Response.Redirect("Default.aspx");
}


*** Add this Code inside MASTER PAGE

My Masters