Click here to Skip to main content
11,630,144 members (76,538 online)
Rate this: bad
Please Sign up or sign in to vote.
protected void LinkButton3_Click(object sender, EventArgs e)
        string connStr = ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
        SqlConnection con = new SqlConnection(connStr);
        string dat =Convert.ToString( DateTime.Now.ToShortDateString());
        SqlCommand cmd = new SqlCommand("update LoginData set LogoutTime='" + dat+ "' where LogSession='" + sessionlog + "'", con);
        Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Script", "alert(' You Are Now Logged Out....');", true);
Posted 11-Feb-13 2:52am
Edited 11-Feb-13 2:58am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I am assuming that if browser back button is clicked after LOGOUT is clicked, application is going back into the application without asking credentials. Take a look at following links, hope they help you:
Browser back button issue after logout[^]
Browser Back Button issue[^]
how to prevent back button after logout in[^]
shoaib_ferrari at 11-Feb-13 9:47am
Thanks Vani...but i tried all the methods but still not able to solve the issue
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

It doesn't look like you are clearing the authentication cookie.
shoaib_ferrari at 11-Feb-13 11:06am
How do you clear that?? I am new to programming...any help pls
Matthew Dennis at 11-Feb-13 11:09am
try searching for ASP.NET Membership

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

Advertise | Privacy | Mobile
Web04 | 2.8.150723.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100