Click here to Skip to main content
16,022,418 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have dropdown and textbox in a page.I have put requiredfield validator for both of them. If i click on button it is validating for textbox first instead of dropdown.Because Dropdown is in first row.How can i fix this?

Regards,
Dhilip
Posted

The validation will be done for both of them simultaneously.

Are you changing the index of the DropDownList before clicking the button?
 
Share this answer
 
check the following for setting up required field validator

http://asp.net-tutorials.com/validation/required-field-validator/[^]

To use required field validator for multiple columns, check this:

Multiple Fields Validator - An ASP.NET Validation Control[^]
 
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