private void fillCity() { string Error = ""; DBCity cityObj = new DBCity(); DataTable table = cityObj.getAllCity(ref Error); GridViewCity.DataSource = table; GridViewCity.DataBind(); }
private void fillCity() { string Error = ""; DBCity cityObj = new DBCity(); DataTable table = cityObj.getAllCity(ref Error); DropDownListCity.DataSource = table; DropDownListCity.DataValueField = "CityID"; DropDownListCity.DataTextField = "CityName"; DropDownListCity.DataBind(); }