0

i have made 2 pages....1 for login n next to show after successful login....
on login page i have created a button....in its handler i have created session.... on the load event of next page i m checking for the availibity of the session variable n its value.... its workin well..... but the problem comes when i press back button of the browser.....after signing out when i press back button the page is being displayed.....(this should not happend).... can anyone help me regarding this...?? plz reply soon....

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by __avd
-1

Use the following code in ur head tag

<script language="JavaScript" type="text/javascript">
javascript:window.history.forward(1);

</script>

i have made 2 pages....1 for login n next to show after successful login....
on login page i have created a button....in its handler i have created session.... on the load event of next page i m checking for the availibity of the session variable n its value.... its workin well..... but the problem comes when i press back button of the browser.....after signing out when i press back button the page is being displayed.....(this should not happend).... can anyone help me regarding this...?? plz reply soon....

0

Turn off client & proxy cache,

protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        if (Session["iskey"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
    }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.