ValidatorCalloutExtender警告框

时间:2009-12-04 17:21:26

标签: .net vb.net ajaxcontroltoolkit

有没有办法让ValidatorCalloutExtender弹出一个标准的警告框?

1 个答案:

答案 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" />