Logout Problem in Login Status Control

Last post 07-23-2008 1:35 AM by bijaya.pathia. 2 replies.

Sort Posts:

  • Logout Problem in Login Status Control

    07-22-2008, 9:52 AM

    Hi all,

    I am using a login status control in my web application master page. If I logout from any other content page then it is redirected to my login page. But the problem is that the back button of the browser becomes enable and when i click on it , it again shows the previous content page which i donot want. Is there any way to redirect the control to the login page even if one hits the back button of the browser .

    if any body knows please suggest me

    thanks

    Bijaya

  • Re: Logout Problem in Login Status Control

    07-22-2008, 10:23 AM
    • Contributor
      2,610 point Contributor
    • jpcoliveros
    • Member since 01-06-2006, 6:54 AM
    • Philippines
    • Posts 375
    • TrustedFriends-MVPs

    Suppose you have the following LoginStatus:

    <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="RedirectToLoginPage" OnLoggedOut="LoginStatus1_LoggedOut" />

     

    Define this  in your code behind. This will clear all session values initiated.


    protected void LoginStatus1_LoggedOut(object sender, EventArgs
    e)
    {   
          Session.Abandon();
    }

    Patrick Oliveros
    superpatrick.wordpress.com
  • Re: Logout Problem in Login Status Control

    07-23-2008, 1:35 AM

    Thanks for your reply. I have followed the steps you have suggested. But same problem occurs.

Page 1 of 1 (3 items)