Examining the RequiredFieldValidator Validation Control

User input can be divided into two categories: required input and optional input. Required input is the set of inputs that the user must provide, whereas optional input is the set of inputs that the user may choose to provide or not to provide. In order to ensure that the user provides a response for a particular input, we can use a RequiredFieldValidator Web control.

To add a RequiredFieldValidator validation Web control to an ASP.NET Web page, all that we have to do is drag and drop the control from the Toolbox and onto the designer, just like we do with any other Web control. Go ahead and drag the RequiredFieldValidator Web control from the Toolbox onto the designer; place the Web control ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.