if (Session["IsAdmin"] != "YES")
{
Response.Write("ACCESS DENIED!");
Response.End();
//Response.Redirect("../AccessDenied.aspx");
}
I have a common Master Page that is used across the entire site, and currently if the user does not have permission on a particular content page, they are redirected to an AccessDenied.aspx page.
What I would like to do is not redirect them, but instead display the Master Page content (header & Footer) with "Access Denied" message in place of the the main content.
I have tried the code below, but the result is that only "Access Denied" is displayed (no header or footer). Any suggestions?
...
Go to the complete details ...