logout button code RRS feed

  • Question

  • User-811900030 posted
    This is the signout button event so that ppl can logout also : :-) Sub Log_out (Sender as Object, E as EventArgs) FormsAuthentication.SignOut() Response.Redirect("logout.aspx") End Sub
    Friday, April 11, 2003 3:46 AM

All replies

  • User1125018143 posted
    I'm getting FormsAuthentication not declared What am I missing? Thanks, Tina
    Saturday, October 25, 2003 11:22 PM
  • User-1227493259 posted
    you will need the following at the top of your page : <%@ import namespace="System.Web.Security" %> That should do it for you... btw I just had that include on my login page only.. since you only need to import it once.. for each session
    Friday, October 31, 2003 12:16 PM
  • User1125018143 posted
    I'll give it a try. Thank you! Tina
    Wednesday, November 5, 2003 9:39 AM
  • User-1329889962 posted

     protected void btnlogout_Click(object sender, ImageClickEventArgs e)









    script language="javascript" type="text/javascript">




    Wednesday, January 6, 2010 2:56 AM
  • User-738792748 posted

    Thank u Very much for log out Code(In detail)

    Saturday, December 18, 2010 6:24 AM
  • User-1298844439 posted

    thanking you sir in working good

    Tuesday, January 4, 2011 3:40 PM
  • User1637850196 posted

    Use of sessions is very import while designing any website

    Monday, January 17, 2011 6:25 AM
  • User-1298844439 posted

    Tuesday, January 18, 2011 1:50 AM
  • User-1298844439 posted

    WHEN we use  userlogin at time session will help to store username display in another pagers .just like an gmail .when we login in gmail . after login user name will be display in all the gmail pages.

    Tuesday, January 18, 2011 1:54 AM
  • User1657332134 posted

    nice trick! thanks for sharing... :)

    Friday, January 21, 2011 10:37 AM
  • User-1090550038 posted


    Is not smart to do, Session.Remove(SessionName); instead because what if there is other data in the session not used for user?

    Saturday, January 22, 2011 8:25 AM
  • User-1298844439 posted

    when we logout  then there is no need for other session values

    Saturday, January 22, 2011 8:35 AM
  • User-1090550038 posted

    I disagree, that is not something you can just use as standaard! In my eyes that is bad practice because a website can store more than just user data in Sessions, it can also store values the website itself uses. And if you just abandon your session, your website will lose that data.

    Saturday, January 22, 2011 10:39 AM
  • User-1298844439 posted

    ha ha ok ok .i will check it ok .

    Saturday, January 22, 2011 11:47 AM
  • User1348250400 posted

    I will give it another try...the session ID doesn't square up but I'll just google it...much obliged! 

    Wednesday, January 26, 2011 8:56 PM
  • User-1108593533 posted

    Thanks for the code and info.

    Web and technology guide

    Monday, March 7, 2011 3:34 AM