validate textbox to be number only [closed]
Another question please
how to validate textbox to be number only by using custom validation, I mean what is the code??
many thanks
try to use following regExp "^\d+$"
You can use a HTML Textbox
and validate through javascript
<input type="text" name="myText" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;">
You can use a mask or use the function IsNumeric()
use RegularExpressionValidatorcontrol This is a good control to check phone numbers validation.
Try this
Age:
Read this document.http://msdn.microsoft.com/en-us/library/aa479013.aspx
精彩评论