protected void LinkButton3_Click(object sender, EventArgs e) { string connStr = ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString; SqlConnection con = new SqlConnection(connStr); con.Open(); string dat =Convert.ToString( DateTime.Now.ToShortDateString()); SqlCommand cmd = new SqlCommand("update LoginData set LogoutTime='" + dat+ "' where LogSession='" + sessionlog + "'", con); cmd.ExecuteNonQuery(); con.Close(); Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Script", "alert(' You Are Now Logged Out....');", true); Response.Redirect("main.aspx"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)