suppose you are having this items in your dropdownlist..
DropDownList1.Items.Add(new ListItem("--Select--","0"));
DropDownList1.Items.Add(new ListItem("Hiren","1"));
DropDownList1.Items.Add(new ListItem("Mohini","2"));
DropDownList1.Items.Add(new ListItem("Chris", "3"));
then.. set the
requiredfieldvalidator's
controltovalidate
property to "
DropDownlist1
" and set the "
InitialValue
" property of the
requiredfieldvalidator
to "0" as this will be the value for "--Select--" you can show above..
hope it helps.
please let us know if you are having some another doubt than this one..