public static void fillCheckBoxListCity(CheckBoxList chkl) { CityBAL balCity = new CityBAL(); chkl.DataSource = balCity.SelectForDropDownList(); chkl.DataValueField = "CityID"; chkl.DataTextField = "CityName"; chkl.DataBind(); }
public static void fillDropDownListCity(DropDownList ddl) { CityBAL balCity = new CityBAL(); ddl.DataSource = balCity.SelectForDropDownList(); ddl.DataValueField = "CityID"; ddl.DataTextField = "CityName"; ddl.DataBind(); ddl.Items.Insert(0, new ListItem("Select City", "-1")); }