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