Whole Numbers Only

vellaima

Centurion
Joined
Jan 29, 2003
Messages
109
If the user enters say "10.05" in "quantity" textbox, an error message is to be displayed. The user should be allowed to enter whole numbers only. Is there any way to do validation.
 
The simplest way would be to search the string for a "." and display your message if one exists.

A better way would be to disallow anything non numeric from being entered in the first place.
 
Back
Top