<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
if (PeterBlum.DES.Globals.WebFormDirector.IsValid)
{
}
}
</script>
<h2>TextBox</h2>
This case applies to all DES TextBoxes, System.Web.UI.WebControls.TextBox and any subclasses.<br/><br/>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<des:RequiredTextValidator ID="RequiredTextValidator1" runat="server"
ControlIDToEvaluate="TextBox1"
ErrorMessage="required." ShowRequiredFieldMarker="true" />
<br/>
<br/>
<h2>DES TextBox with ValueWhenBlank set</h2>
All DES TextBoxes offer the <a href="../../../TextBoxes/Common/ValueWhenBlank.aspx" class="PropertyName">ValueWhenBlank</a> property. The RequiredTextValidator knows to treat that string
as if the textbox is blank.<br/><br/>
<des:TextBox ID="TextBox2" runat="server" ValueWhenBlank="Fill me in"></des:TextBox>
<des:RequiredTextValidator ID="RequiredTextValidator3" runat="server"
ControlIDToEvaluate="TextBox2"
ErrorMessage="required." ShowRequiredFieldMarker="true" />
<br/>
<br/>
<h2>MultiSegmentDataEntry</h2>
<des:MultiSegmentDataEntry ID="MultiSegmentDataEntry1" runat="server">
<Segments>
<des:IntegerTextSegment MinLength="1" MaxLength="3" CssClass="DESTBMultiSegTextBox"
ShowSpinner="True" FormattingTextAfter="." />
<des:IntegerTextSegment MinLength="1" MaxLength="3" CssClass="DESTBMultiSegTextBox"
ShowSpinner="True" FormattingTextAfter="." />
<des:IntegerTextSegment MinLength="1" MaxLength="3" CssClass="DESTBMultiSegTextBox"
ShowSpinner="True" FormattingTextAfter="." />
<des:IntegerTextSegment MinLength="1" MaxLength="3" CssClass="DESTBMultiSegTextBox"
ShowSpinner="True" />
</Segments>
</des:MultiSegmentDataEntry>
<des:RequiredTextValidator ID="RequiredTextValidator2" runat="server"
ControlIDToEvaluate="MultiSegmentDataEntry1"
ErrorMessage="required" ShowRequiredFieldMarker="true" >
</des:RequiredTextValidator>
<br/>
<br/>
See also:<br/>
<a href="../../../DateAndTime/DateTextBoxes/Validators.aspx" class="ControlClass">On DateTextBoxes</a><br/>
<a href="../../../DateAndTime/TimeTextBoxes/Validators.aspx" class="ControlClass">On TimeOfDayTextBox and DurationTextBox</a><br/>
<br/>
<des:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click"></des:Button>