I am using the standard ASP.NET Textbox.
I only want my user to be able to enter integer values.
How can I mask this using javascript?
Also I don't want my user to be able to copy and paste an invalid string
into the textbox.
Thanks,
CHello C,
Basically, you will want to add attributes to the TextBox which point to the
javascript routines you'll use to filter events. Someone over at the Code
Project already did part of what you want:
http://www.codeproject.com/aspnet/NumericValidator.asp
To work with the paste you'll need to fashion something similar to what
they're doing here:
http://www.codeproject.com/useritem...h_Validator.asp
--
enjoy - brians
http://www.limbertech.com
"C" wrote:
Quote:
Originally Posted by
Hi,
I am using the standard ASP.NET Textbox.
>
I only want my user to be able to enter integer values.
>
How can I mask this using javascript?
>
Also I don't want my user to be able to copy and paste an invalid string
into the textbox.
>
Thanks,
C
>
>
0 comments:
Post a Comment