0

Hi Guys
I've made a id number textbox and wanna when users typing characters the server
tell them type digits
what should i do?

4
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by fawadkhalil
0

Why cant u try the Masked Edit control in Ajax Control Toolkit?

Or

Use CompareValidator using Type comparison.

Or

Manual Checking for ASCII - its not advisable.

0

use isnumeric

If (IsNumeric(TextBox1.Text)) Then
            MsgBox("correct")
        Else
            MsgBox("incorrect")
        End If
0

Use RegularExpressionValidator; which is used to determine whether the value of an input control matches the pattern defined by regular expression.

Validation exrpession for textbox that only accepts integer value is
^(?=.*[1-9].*$)\d{0,7}(?:\.\d{0,9})?$

Set ErrorMessage property to Enter digits Only or what ever you want.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.