Validate a textbox for integer value only

Poster
Posted by Poster under ASP.NET category on | Views : 4746
Following codesnippet of asp:CompareValidator can be used to validate a textbox to allow Integer value only.

<asp:CompareValidator ID="com12" runat="Server" Text="Numeric only" ControlToValidate="txtAge" Operator="DataTypeCheck" Type="Integer" Display="Dynamic" />


Thanks

Comments or Responses

Login to post response