vb.netvalidation

InputBox Numeric validation in vb.net


I've used inputbox in my vb.net2008 application to accept quantity for a particular product, I want to give numeric validation for this inputbox. The characters(a-z) must not be able to entered in this input box, the same that we do on a textbox_keypress event. Please help


Solution

  • Check this out...

    http://www.functionx.com/vb/functions/inputbox.htm

    Just what I thought. It says the inputbox does not have filtering events that you can subscribe to. So my suggestion, you have 2 options... Either create your own input box and subscribe to the textbox keypress event to filter data or have the user enter data into the inputbox first and validate data after it's entered, if you insist on using the inputbox. These are your only options.