Here's an easy way to check to make sure that the User enters an Integer in an Integer field.
<asp:CompareValidator ID="CompareValidatorErrors" ErrorMessage="Please Enter an Integer" Type="Integer" Operator="DataTypeCheck" ControlToValidate="TxtNumberErrors" runat="server"></asp:CompareValidator>
You can specify the ValidationTypeProperty within the Type property to specify (Currency, DateTime, Double, Integer, String) to Compare against.
Showing posts with label Validate Int. Show all posts
Showing posts with label Validate Int. Show all posts
Tuesday, March 3, 2009
Subscribe to:
Posts (Atom)
