01792.org

Milo

ASP.NET type validator

September 28
by milo 28. September 2009 14:10

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>

Tags:

Comments are closed