In
computer science,
data validation is the process of ensuring that a program operates on clean, correct and useful data. It uses routines, often called "
validation rules" or "check routines", that check for correctness, meaningfulness, and security of data that are input to the system. The rules may be implemented through the automated facilities of a
data dictionary, or by the inclusion of explicit
application program validation logic.
We have differnt validation controls in ASP.Net;
RequiredFieldValidator
CompareValidator
RangeValidator
RegularExpressionValidator
CustomValidator
ValidationSummary
http://www.beansoftware.com/ASP.NET-Tutorials/Validation-In-ASP.NET.aspx
In windows applciation you can do validation for textboxes on events like; KeyPress, KeyDown, KeyUp etc as per your requirement.... Also you can use
ErrorProvider to show error in proper format.....
http://www.codeproject.com/KB/validation/validationprovider.aspx