data validation when user inputs values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm using a form to collect values for later analysis. My question is,
how do I validate the value the user inputs into a textbox? For example, many
of the values require a real number and nothing else is acceptable. Others
may require an integer.

Thanks,
Scott
 
You can examine the values in the Validating event if you wish, or the
TextChanged
event, or several others. To mask input characters you'll want to process Key
messages
to ensure only valid characters can be input.

If you are doing large amounts of data processing you'll want some high powered
parsing
tools. You can use the following to parse integers, and slightly modified to
parse decimal
values as well.

http://weblogs.asp.net/justin_rogers/articles/104504.aspx
 
Back
Top