第 1 行: ',' 附近有语法错误。
stringsql="selectAdminName,AdminPwdfromWeb_AdminwhereAdminName='"+TxtAdminName.Text.T...
string sql = "select AdminName,AdminPwd from Web_Admin where AdminName='" + TxtAdminName.Text.Trim() +"', AdminPwd='" + TxtAdminPwd.Text.Trim() +"'";
DataTable dt=new DataTable();
dt=odb.ExeSql(sql).Tables[0];
if (dt.Rows.Count > 0)
{
Session["AdminUserName"] = TxtAdminName.Text.Trim();
Session["AdminPassWord"] = TxtAdminPwd.Text.Trim();
Response.Redirect("~/admin/index.aspx");
}
else
{
Label1.Text = "用户名称或密码错误!";
return;
}
登录窗口代码如下,出现以上错误, 怎么改呢??? 展开
DataTable dt=new DataTable();
dt=odb.ExeSql(sql).Tables[0];
if (dt.Rows.Count > 0)
{
Session["AdminUserName"] = TxtAdminName.Text.Trim();
Session["AdminPassWord"] = TxtAdminPwd.Text.Trim();
Response.Redirect("~/admin/index.aspx");
}
else
{
Label1.Text = "用户名称或密码错误!";
return;
}
登录窗口代码如下,出现以上错误, 怎么改呢??? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询