Read this article in your language IT | EN | DE | ES
I had no idea you can use a compare validator to compare a control against a system type.
This example ensures the use types in a number…
<asp:CompareValidator runat="server" ID="valID" Text="*"
ErrorMessage="ID must be an integer" ControlToValidate="txtID"
Type="Integer" Operator="DataTypeCheck" Display="Dynamic">
asp:CompareValidator>