<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
if (PeterBlum.DES.Globals.WebFormDirector.IsValid)
{
}
}
</script>
To show an error, click the button for <span class="PropertyName">FocusOnSubmit</span> to set focus. The type 'abc'
into the textbox and tab off for <span class="PropertyName">FocusOnChange</span> to set focus.<br/>
The ValidationSummary also has its
<a href="../../ValidationSummary/DisplayMode.aspx#HyperLinkToFields" class="PropertyName">HyperLinkToFields</a> property set to true, so click on its error messages.<br/>
<br/>
<des:PageManager ID="PageManager1" runat="server" FocusOnChange="True" FocusOnSubmit="True" />
TextBox1: <asp:TextBox ID="TextBox1" runat="server" />
<des:RequiredTextValidator ID="RequiredTextValidator1" runat="server"
ControlIDToEvaluate="TextBox1" ErrorMessage="Required" SummaryErrorMessage="TextBox1 requires a value" >
<ErrorFormatterContainer>
<des:TextErrorFormatter Display="Dynamic" />
</ErrorFormatterContainer>
</des:RequiredTextValidator>
<des:DataTypeCheckValidator ID="DTC1" runat="server" ControlIDToEvaluate="TextBox1"
DataType="Integer" ErrorMessage="Illegal format. Only digits are allowed."
SummaryErrorMessage="TextBox1 requires an integer" />
<br/>
TextBox2: <asp:TextBox ID="TextBox2" runat="server" />
<des:RequiredTextValidator ID="RequiredTextValidator2" runat="server"
ControlIDToEvaluate="TextBox2" ErrorMessage="Required" SummaryErrorMessage="TextBox2 requires a value" >
</des:RequiredTextValidator>
<br/>
<des:Button ID="Button1" runat="server" Text="Submit" />
<br/>
<des:ValidationSummary ID="ValidationSummary1" runat="server" HyperLinkToFields="true"
HeaderText="Please fix these errors:" />