ASP.Net validator

<asp:TextBox ID="txtTransitDays" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="TransitDaysRegexValidator"
     ControlToValidate="txtTransitDays" runat="server"
     ErrorMessage="Only positive integer numbers are allowed"
     ValidationExpression="^[1-9]\d*$" Display="Dynamic">
</asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="TransitDayRequiredValidator" 
     ControlToValidate="txtTransitDays"
     ErrorMessage="Required field" runat="server" Display="Dynamic"></asp:RequiredFieldValidator>
相關文章
相關標籤/搜索