if (updateById == null) return; btnSave.CommandArgument = updateById.CityDetailsId.ToString(CultureInfo.InvariantCulture); BindStateDetails(); ddlState.SelectedValue = Convert.ToString(updateById.StateId); BindCityList(); //libAdminCity.DataSource = updateById.CityName; message3 = updateById.VCityId; message4 = updateById.CityName; string[] arr = message4.Split(','); for (int i = 0; i < arr.Length; i++) { foreach (ListItem item in libAdminCity.Items) { // int j = 0; // if (item.Text == arr[i]) if (libVendorCity.Items.Contains(item)) { //libVendorCity.Items.Add(new ListItem(Convert.ToString(item.Text), Convert.ToString(item.Value))); libAdminCity.Items.Remove(item); } //else //{ // libVendorCity.Items.Add(new ListItem(Convert.ToString(item.Text), Convert.ToString(item.Value))); //} } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)