本文介绍了给RequiredFieldValidator后,注销按钮不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<pre>
<tr>
<td align="left">
<asp:label id="lblOpenid" cssclass="lblOpen" runat="server" text="Open jobs By Specific Id" xmlns:asp="#unknown">
</asp:label>
<asp:textbox id="TextBox1" runat="server" width="78px" causesvalidation="true" xmlns:asp="#unknown">
</asp:textbox>
<asp:button id="Button1" runat="server" text="Click" onclick="Button1_Click" xmlns:asp="#unknown" /><br />
<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="TextBox1" errormessage="Plz enter Problem ID" xmlns:asp="#unknown">
</asp:requiredfieldvalidator>
</td>
</tr>
<tr>
<td align="left"> 
<asp:label id="lblCloseid" cssclass="lblClose" runat="server" text="Close jobs By Specific Id" xmlns:asp="#unknown">
</asp:label>
<asp:textbox id="TextBox2" runat="server" width="76px" causesvalidation="true" xmlns:asp="#unknown">
</asp:textbox>
<asp:button id="Button2" runat="server" text="Click" onclick="Button2_Click" xmlns:asp="#unknown" />
<br />
<asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="TextBox2" errormessage="Plz enter Problem ID" xmlns:asp="#unknown">
</asp:requiredfieldvalidator>
</td>
</tr>
<table>
<tr>
<td style="width: 211px" valign="top" align="center">
<asp:button id="btnLogout" runat="server" backcolor="#6699cc" bordercolor="#6699cc" xmlns:asp="#unknown"
BorderStyle="None" CausesValidation="true" ForeColor="White" OnClick="btnLogout_Click"
Text="Logout" Visible="true" Width="98px" />
</asp:button>
</td>
</tr>
</table>
</pre>
推荐答案
CausesValidation="false"
. :)
这篇关于给RequiredFieldValidator后,注销按钮不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!