asp.net.netlogoutlogin-control

how to really logout in asp.net


I use LoginControl for login into my website in asp.net, but when for logout use login status or session.Abandon or .sign out ,there's white backspace, my homepage is loaded and its not secure.

Please help me that use realy logout in my project.


Solution

  • I found a solution that I use in my master page

    if (Membership.GetUser() != null)
        .....
    else Response.Redirect("Login.aspx")
    

    and codebehind for logout button:

    FormsAuthentication.SignOut();
    Response.Redirect("Login.aspx");
    

    Thanks for your help!