Answer: Yes. With the validator control, you need to set type attribute to the desired datatype which in this case is “Integer” and Operator to DataTypeCheck.
<asp:CompareValidator ID="CompareValidator1" ControlToValidate="TextBox1" Type="Integer" Operator="DataTypeCheck"
runat="server" ErrorMessage="CompareValidator"></asp:CompareValidator>
Asked In: Many Interviews |
Alert Moderator