I have two dropdownlists and I want to take user city and province in user profile.I write database user profile correctly but In Edit User Profile.aspx I select city index from database correctly and get provinces according to this city but Province selectedindex isnot same with index in database.This .aspx file shows 0.index item in province dropdownlist.MeanWhile DDL_Province.SelectedIndex = GetfromProvinceIndexFromDatabase(userid); // selected correctly from database
DDL_City.SelectedIndex = GetfromCityIndexFromDatabase(userid); (4)
DDL_Province.DataSource = Province;
DDL_Province.DataBind();
DDL_Province.SelectedIndex = GetfromProvinceIndexFromDatabase(userid); (2)
but DDL_Province show user 0.index item. I think this problem is occured because of DataBind(). How do I solve this problem???