RequiredValidation Controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a asp pase. I have one text box, txtName, txtStartDate, txtEndDate.
and a button Submit.I have a grid view hand it has edit, delete and cancel
buttons. I want to validate my page.
I have three RequiredValidation controls for three text boxes. I want that
error message should only appear when I click on button. But when I click on
some where in grid view or when I select any row in grid view it should not
show error message.

Thanks.
 
bobby said:
Hi,
I have a asp pase. I have one text box, txtName, txtStartDate,
txtEndDate.
and a button Submit.I have a grid view hand it has edit, delete and cancel
buttons. I want to validate my page.
I have three RequiredValidation controls for three text boxes. I want
that
error message should only appear when I click on button. But when I click
on
some where in grid view or when I select any row in grid view it should
not
show error message.

Convert the GridView's fields into TemplateFields.
Then, set CausesValidation="False" on the buttons in the TemplateFields.

Riki
 
Back
Top