Click here to Skip to main content
15,617,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a Add product form in which i am showing all the products available currently also i am providing some text box in which Admin can add new product.
I am using required field validator for checking required fields.

When i am clicking on the update button in grid view template field to update a column.
It shows message of to first fill all the details even though i am not inserting the data of text box in the database.

Thanks in advance.

1 solution

As far as I can get from your problem description that you would like your validator to work only if you have entered anything in the text field. But as far I know you cannot have conditions with the standard required field validator. It will validate for the field of the associated control aoon as you click something on the form. You may try CustomValidator in .NET with the required "if" conditions you would like to have.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900