hi
I have asp:LoginStatus on my master page
and in my login.aspx.cs file I have logiIn button, which have the selected event handler
protected void btLogIn_Click(object sender, EventArgs e)
{
int chk = _dbobj.CheckingIfUserExists(tbUserName_login.Text, tbPassword_login.Text);
if (chk != 0)
{
Response.Cookies["UserName"].Value = tbUserName_login.Text.Trim();
lbUserNameValidation_logIn.Text = "";
Response.Redirect("Home.aspx", false);
if (chbRemember_login.Checked)
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(1);
System.Web.Security.FormsAuthentication.RedirectFromLoginPage(tbUserName_login.Text, true);
}
else
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1);
System.Web.Security.FormsAuthentication.RedirectFromLoginPage(tbUserName_login.Text, false);
}
}
else
............When I log in without checking remember box, it remembers anyway, and doesn't set logged out after closing and opening the page.
What to do. Please help