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
Loading
harika mPosted Nov 20, 2008, 1:04 AM
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
Bechir BejaouiPosted Nov 14, 2008, 3:25 PM