VB.Net simple validation question

The easiest way would be to mark the "numeric" property of the eit control. Then, only numbers can be entered.

If that's not adequate (and it might not be, since it allows floating point numbers), you'll have to decide exactly what integer formats you want and write a little code. Do you allow thousands seperators, for example?

A simple approach is to call Int32.Parse and see if it throws an exception.
 
Thanks for the reply. I kind of took the easy way out and replaced the textbox with a numericupdown. :cool:
 
Yeah, the up down can work in some applications. Thing is, it's got a few limitations when used from managed code -- such as no acceleration.
 
Back
Top