I have dropdown list+datasource it shows the direct values in dropdownlist i.e list of countries which i have in database but i want that first it should show at the top index of dropdown list ....Please Select a country........ also if i do not select any country from dropdown list the aspx page before go to next page should display a message select a country
Datasource+dropdown+...Please Select Country........
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Bechir BejaouiRank #144 · 15.9K reputationPosted Nov 14, 2008, 10:25 AM EST
harika m151 reputationPosted Nov 19, 2008, 8:04 PM EST
hi buddy,
try this code.... (CS CODE)
DataSet
ds = new DataSet();ds.ReadXml(Server.MapPath(
"dropdatasource.xml"));DropDownList1.DataSource = ds.Tables[0];
DropDownList1.DataBind();
DropDownList1.Items.Insert(0,
"Select..");my database is not working. so i tried with xml file.
u jst insert the 'select' item at 0 index