WebDropDown™ can easily be validated using the RequiredFieldValidator control to ensure that the end-user selects at least one item from the drop-down list.
In this walkthrough, you will validate a WebDropDown control with the click of a button.
You will learn how to validate WebDropDown using the RequiredFieldValidator.
From the Visual Studio™ Toolbox, drag and drop a ScriptManager component, a WebDropDown control, a standard Button control and a RequiredFieldValidator validation control.
Add items to the WebDropDown as shown in the Adding Items to WebDropDown using the Designer topic.
Set the following properties of the RequiredFieldValidator control in the property window:
Save and run your application. Delete the item in the value display of the WebDropDown and click the button. You will observe an error message displayed similar to the following image: