P
Pascal
hi,
does anybody know how to set the selected index in a dropdownlist
when page is loaded for the first time? my code looks like:
int iCountryID = Int32.Parse(countryID);
dsCountryList = ds.getCountryList();
dropCountry.DataSource = dsCountryList;
dropCountry.DataValueField = "ID";
dropCountry.DataTextField = "Name";
dropCountry.DataBind();
dropCountry.SelectedIndex = iCountryID;
always first entry in dropdown is selected per default...
thx
pascal
does anybody know how to set the selected index in a dropdownlist
when page is loaded for the first time? my code looks like:
int iCountryID = Int32.Parse(countryID);
dsCountryList = ds.getCountryList();
dropCountry.DataSource = dsCountryList;
dropCountry.DataValueField = "ID";
dropCountry.DataTextField = "Name";
dropCountry.DataBind();
dropCountry.SelectedIndex = iCountryID;
always first entry in dropdown is selected per default...
thx
pascal