RequiredValidation Controls

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.
 
R

Riki

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top