开发者

validate textbox to be number only [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question s开发者_运维百科o that it can be reopened, visit the help center. Closed 12 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜