Posted on: 1/8/2014 7:01:30 PM | Views : 634

i want to implement the functionality of remember me in my login page.for this purpose i have used cookies. it is working fine but when login and logout twice , then after try to login for the same username and password, it shows invalid username and password. code for login page.
protected void Page_Load(object sender, EventArgs e) { lblStatus.Visible = false; if(Request.Cookies["temp"] != null) { txtUsername.Text = Request.Cookies["temp"].Values["u"]; txtPassword.Text = Request.Cookies["temp"].Values["p"]; } } protected void btnLogn_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(str); con.Open(); string username = txtUsername.Text; string password = txtPassword.Text; SqlCommand cmd = new SqlCommand("select username from Login where ...

Go to the complete details ...