我有以下登录表单,我正在使用Block UI在服务器端验证进行时阻止登录表单,并且由于更新面板,在刷新更新面板后,此阻止 ui 再次取消阻止登录表单:
登录表单:
<h1>User Login</h1>
<asp:Label ID="lblErrorCredentials" runat="server" ForeColor="Red"></asp:Label>
<label class="grey" for="log">Email ID:</label>
<asp:TextBox ID="txtCustEmailID" runat="server" CssClass="field"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvCustEmailID" runat="server" Font-Bold="False"
Font-Size="Small" ForeColor="Red" ErrorMessage="Please Enter Valid EmailId."
ControlToValidate="txtCustEmailID" SetFocusOnError="True"Text="*">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revCustEmailID" runat="server"
ControlToValidate="txtCustEmailID" ErrorMessage="Invalid Email ID" Font-Bold="False"
Font-Size="Small" ForeColor="Red"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
</asp:RegularExpressionValidator>
<label class="grey">Password:</label>
<asp:TextBox ID="txtCustPwd" runat="server" CssClass="field"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvCustPwd" Font-Bold="False"Font-Size="Small" ForeColor="Red" runat="server" ErrorMessage="Please Enter Your Password."
ControlToValidate="txtCustPwd" SetFocusOnError="True" Text="*">
</asp:RequiredFieldValidator>
<asp:Button ID="btnCustLogin" runat="server" Text="Login" OnClick="btnCustLogin_Click"/>
这个块 ui 正在做什么它永久地阻止我的 div 仍然由于错误的输入而激活了验证器,并且用户无法再次重试日志记录。
以下是块 ui 的代码
阻止用户界面:
$(document).ready(function () {
$('#btnCustLogin').click(function () {
$('div#LoginForm').block({
message: '<h4>Processing</h4>',
css: { border: '3px solid #35a7c1' }
});
});
});
现在我想要的是,每当我的 asp 验证器被激活时,这个块 ui 应该被禁用。请帮帮我。