tags:

views:

72

answers:

1
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache );
        Response.Cache.SetAllowResponseInBrowserHistory(false);
    }

This code i have used to authenticate the website,its working but only when the user copies the url and paste it in a new window,but opening in the new window leads to the next page without any login credentials.

A: 

For authentication: In page_Load Events

if (session(user_id) != null) {
  response.redirect("the_page_which_you_want_to_go.aspx");
} else {
  response.redirect("Login.aspx");
}
Please use SO's code formatting, it will make your answers far clearer.
Richard