登录页面: win7 64位下 发布后 按button按钮不起作用.
<body>
<form id="form1" runat="server">
<extageManager ID="ageManager1" runat="server" />
<ext:Window ID="Window1" runat="server" Title="登录表单" IsModal="false" EnableClose="false"
WindowPosition="GoldenSection" Width="350px">
<Items>
<ext:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="false" BodyPadding="10px"
LabelWidth="60px" EnableBackgroundColor="true" ShowHeader="false">
<Items>
<ext:TextBox ID="tbxUserName" Label="用户名" Required="true" runat="server">
</ext:TextBox>
<ext:TextBox ID="tbxPassword" Label="密码" TextMode="assword" Required="true" runat="server">
</ext:TextBox>
<ext:Button ID="btnLogin" Text="登录" ValidateForms="SimpleForm1" ValidateTarget="Top"
runat="server" OnClick="btnLogin_Click">
</ext:Button>
</Items>
</ext:SimpleForm>
</Items>
</ext:Window>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
</form>
</body>
</html>
protected void btnLogin_Click(object sender, EventArgs e)
{
UserInfoBusiness m_userInfo=new UserInfoBusiness();
UserInfoEntity Result = m_userInfo.GetUserInfo(tbxUserName.Text);
if (Result == null)
{
Alert.ShowInTop("用户名或密码错误!", MessageBoxIcon.Error);
return;
}
else
{
if (tbxPassword.Text != Result.Password|| Result.State=="0")
{
Alert.ShowInTop("用户名或密码错误!", MessageBoxIcon.Error);
return;
}
}
new Cookie().setCookie("UserName", Result.UserName, 2);
Response.Redirect("Default.aspx",true);
}
|