Validating drop down list in asp c sharp Dubasex
I have requiredfieldvalidators for my textboxes on the same page and they work perfectly.
aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.
In this article I try to explain how to validate Drop Down List and List Box using Required Field Validator.
I hope after reading this article you will be able to use this trick in your code.
requiredfieldvalidator control's Initial Value property get or set the initial value of the associated input control.
in this example code dropdownlist initial value is 'Choose One', because we set this text for the dropdownlist control's first item Text property value.
Drop Down List is an list web server control that allow us to select a single item from a drop-down-list at a time. the following c# example code demonstrate us how can we validate a dropdownlist control in a web form.