有没有办法让ValidatorCalloutExtender弹出一个标准的警告框?
答案 0 :(得分:0)
如果目标是警报验证结果,则不需要ValidatorCalloutExtender。您可以使用标准的.Net ValidationSummary:
<asp:TextBox ID="tb1" runat="server"></asp:TextBox>
<asp:Button ID="btn1" runat="server" Text="Click" />
<asp:RequiredFieldValidator runat="server" ID="validateEmptyText"
ControlToValidate="tb1"
Display="None"
ErrorMessage="Required field is missing." />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" />