各位大虾们,请问如何判断登录界面的用户名和密码正确,我是这样判断的,可为什么不对呀,
数据库已连接上了
string strSql = "select* from t_Emp where (FName='"+cmbUser.Text +"') and (FPassWord='" +txtPassWord.Text +"')";
SqlDataAdapter thisDataAdapter = new SqlDataAdapter(strSql, thisConn);
DataSet thisDataSet = new DataSet();
thisDataAdapter.Fill(thisDataSet, "t_Emp");
int i = thisDataSet.Tables[0].Rows .Count ;
if (i==1)
{
Response.Redirect("showmain.aspx");
}
else
{
}