Using a RequiredField validator control on an textbox within the EditITemplateof a DataList
Does anyone know if you can use a RequiredFieldValidator control on a textbox within the EditItemTemplate of a DataList?
I Have an aspx page that displays the detail of a record in the form of a DataList. When you click on an edit link, the item detail information is editable. The problem is if you erase/clear the textboxes where you can edit the details and click on an Update link, those fields will be updated in the database as blanks. What I want to do is validate those fields to have some value before the Update has taken place. I tried to use the RequiredFieldValidator control on these fields, but every time I run the update routine the Page.IsValid evaluates to true and the routine is executed.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center