I have one database which has the following data in the tblUser:
ID UserName UserPass IsSelected
1 ABC abc@123 1
2 SKY sky@123 1
3 XYZ xyz@123 1
Now these three users will login septately at same time using their own pc.
I want to add Remember me functionality for each user seprately. Here is my code
private void frmLogin_Load(object sender, EventArgs e)
{
Remember();
}
private void Remember()
{
con = new SqlDbConnect();
con.SqlQuery("select UserName,UserPassword,IsSelected from tblUsers where IsSelected='1' or IsSelected='0'");
// con.Cmd.Parameters.Add(new SqlParameter("@No", this.txtName.Text.Trim()));
con.Rdr = con.Cmd.ExecuteReader();
if (con.Rdr.Read())
{
txtUserName.Text = con.Rdr["UserName"].ToString();
txtUserPass.Text = con.Rdr["UserPassword"].ToString();
chkRem.Checked = Convert.ToBoolean(con.Rdr["IsSelected"].ToString());
}
}
but it is showing me for one user.
how to fix it and get solution pls