打上密码用户点登录网页没有任何变化,即使打上错误密码用户也不提示错误,点取消(reset)也没有任何变化,我把断点设置在btnsumit_click行,照样显示,为什么这之后的代码不执行呢,请问该怎么调试?修改 public partial class Login_SysUserLogin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ }
protected void btnSubmit_Click(object sender, System.EventArgs e)
{
//DataOperation dop=new DataOperation();
//if(dop.isDataFind("SysUser","Where UserName='"+ txtUser.Text.Replace("'","''")+"' and Password='"+ txtPassword.Text.Replace("'","''")+"'"))
if (txtUser.Text.Equals("1") && txtPassword.Text.Equals("1"))
{
Response.Redirect("../SystemManage/SysMain.htm");
}
else
{
lblMsg.Text = "密码错误";
}
} private void btnReset_Click(object sender, System.EventArgs e)
{
txtUser.Text = "";
txtPassword.Text = "";
lblMsg.Text = "";
}
}
{
protected void Page_Load(object sender, EventArgs e)
{ }
protected void btnSubmit_Click(object sender, System.EventArgs e)
{
//DataOperation dop=new DataOperation();
//if(dop.isDataFind("SysUser","Where UserName='"+ txtUser.Text.Replace("'","''")+"' and Password='"+ txtPassword.Text.Replace("'","''")+"'"))
if (txtUser.Text.Equals("1") && txtPassword.Text.Equals("1"))
{
Response.Redirect("../SystemManage/SysMain.htm");
}
else
{
lblMsg.Text = "密码错误";
}
} private void btnReset_Click(object sender, System.EventArgs e)
{
txtUser.Text = "";
txtPassword.Text = "";
lblMsg.Text = "";
}
}
<head runat="server">
<title>SysUserLogin</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<font face="宋体">
<asp:Label id="lblCaption" style="Z-INDEX: 101; LEFT: 232px; POSITION: absolute; TOP: 72px"
runat="server" Width="256px" Height="40px" font-Names="华文行楷" font-Bold="true" font-Size="XX-Large"
ForeColor="Navy">管理员登录</asp:Label>
<asp:Panel id="pnl" style="Z-INDEX: 102; LEFT: 256px; POSITION: absolute; TOP: 128px" runat="server"
Width="208px" Height="136px">
<p>
<asp:Label id="lblUser" runat="server" Width="48px">用户名</asp:Label>
<asp:TextBox id="txtUser" runat="server" Width="144px" BorderStyle="Solid" ></asp:TextBox></p>
<p>
<asp:Label id="lblPassword" runat="server" Width="48px">密码</asp:Label>
<asp:TextBox id="txtPassword" runat="server" Width="144px" BorderStyle="Solid" TextMode="Password"></asp:TextBox></p>
<p>
<asp:Button id="btnSubmit" runat="server" Height="32px" Width="80px"
BorderStyle="Solid" Text="登录"></asp:Button>
<asp:Button id="btnReset" runat="server" Height="32px" Width="80px"
BorderStyle="Solid" Text="取消"></asp:Button></p>
</asp:Panel>
<asp:Label id="lblMsg" style="Z-INDEX: 103; LEFT: 248px; POSITION: absolute; TOP: 272px" runat="server"
Width="232px" Height="24px" ForeColor="Red"></asp:Label></font>
<br/>
</div>
</form>
</body>
</html>