O'Reilly logo

MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET by MCSD Amit Kalani - MCAD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validating User Input

Validate user input.

Garbage in results in garbage out. When designing an application that accepts data from the user, you must ensure that the entered data is acceptable for the application. The most relevant place to ensure the validity of data is at the time of data entry itself. You can use various techniques for validating data:

  • You can restrict the values that a field can accept by using standard controls such as combo boxes, list boxes, radio buttons, and check boxes. These allow users to select from a set of given values rather than permit free keyboard entry.

  • You can capture the user's keystrokes and analyze them for validity. Some fields may require the user to enter only alphabetic values but no numeric values ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required