Adding validator controls to a form


show more Adding validator controls to a form provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Adding validator controls to a form

Once you have modified a DetailsView control to use Template fields instead of Bound fields, you are then ready to add validator controls. Each validator control is bound to a single form control and each form control can be validated by one or more validators. You place the validator controls in the same Template fields that host the textboxes or other data entry form controls that the user interacts with to provide data. For this demonstration I'll work with the page named TitleInsertValidation.aspx. In this version of the page there are two Template fields.

One for the Price and the other for the PubDate columns. They each have a TextBox control that allows user to type-in values but currently neither is validated. I'm going to show you how to add validator controls both in Design View and through code. I will start off in Design View. In Design View I'll select the DetailsView control. I'll open its Task list and select Edit Templates. I'll pull down the Template ...

Adding validator controls to a form
Video duration: 6m 40s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Adding validator controls to a form provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...