What's the best way to validate a txtbox that needs an integer input into it so that it does not allow text or other garbage. In JavaScript there's a handy "NaN" ("Not A Number") function that can be validated against a textbox (if x = NaN Then alert("Booom!")) if a string is input instead of an integer.

I've tried converting the textbox to an integer and if the conversion fails, then obviously it's not a number. This is a bit bulky, though, and I'm hoping there's a slicker way.

Those were long sentences. I hope they made sense.

Thanks,

Ed