I have a DropDownList binded with aSqlDataSource to display the values from the database.
I am unable to validate using a RequiredFie
If you are using a data source, here's another way to do it without code behind.
Note the following key points:
ListItem of Value="0" is on the source page, not added in codeListItem in the source will be overwritten if you don't include
AppendDataBoundItems="true" in the DropDownListInitialValue="0" tells the validator that this is the value that
should fire that validator (as pointed out in other answers)Example: