<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 or type 'abc' into the textbox and tab off. In
this example, the RequiredTextValidator has <span class="PropertyName">OtherStyles</span>="Alternative", giving the
textbox a different appearance. To see it, clear the textbox and tab off.<br/>
<des:PageManager ID="PageManager1" runat="server" ChangeStyleOnControlsWithError="True" />
<asp:TextBox ID="TextBox1" runat="server" />
<des:RequiredTextValidator ID="RequiredTextValidator1" runat="server"
ControlIDToEvaluate="TextBox1" ErrorMessage="Required"
OtherStyles="Alternative" >
<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." />
<br/>
<des:Button ID="Button1" runat="server" Text="Submit" />