Logout Page issue

Discussion in 'ASP .Net' started by Lav KG, Aug 31, 2006.

  1. Lav KG

    Lav KG Guest

    Hi,

    I want a user to be redirected to the Login page once he logs out of a
    web portal.
    Can anyone tell me how I need to go about it?

    Thanks in advance
    Lav KG
     
    Lav KG, Aug 31, 2006
    #1
    1. Advertisements

  2. Lav KG

    mocsoft Guest

    if your using sessions to control the login then ur in luck, this is
    some simple code i have used before to remove the login credentials and
    redirect the user to a given page:

    Session.RemoveAll
    Response.Redirect("login_page.aspx")


    However if you are using sessions to provide login facilities you
    shouldnt be. Asp.Net 2 has a new suite of login controls which are
    excellent once you get familar with them. If your using these login
    controls then its just a matter of displaying this control with the
    logoutAction specified

    <asp:LoginStatus ID="LoginStatus1" runat="server"
    LogoutAction=RedirectToLoginPage />
     
    mocsoft, Aug 31, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.