打上密码用户点登录网页没有任何变化,即使打上错误密码用户也不提示错误,点取消(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 = "";
    }
   
}

解决方案 »

  1.   

    btnsumit_click看看html代码有没有勾挂上事件
      

  2.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="SysUserLogin.aspx.cs" Inherits="Login_SysUserLogin" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN" "http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
    <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>&nbsp;&nbsp;
    <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>