/// <summary> /// Handles SelectedIndexChanged event of chklState control /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void chklState_SelectedIndexChanged(object sender, EventArgs e) { //var selectedcity = chklCity.Items.Cast<ListItem>().Where(li => li.Selected).ToList(); //txtCity.Text = string.Join(",", selectedcity.Select(x => x.Text)); try { var selectedstate = chklState.Items.Cast<ListItem>().Where(li => li.Selected).ToList(); txtPreferredState.Text = string.Join(",", selectedstate.Select(x => x.Text)); DataSet ds = new DataSet(); CurrentDesiredJobBAL currentDesiredJobBAL = new CurrentDesiredJobBAL(); string stateId = string.Join(",", selectedstate.Select(x => x.Value)); ds = currentDesiredJobBAL.GetCityBAL(stateId); if (ds != null) { chklCity.DataSource = ds; chklCity.DataTextField = "CityName"; chklCity.DataValueField = "CityId"; chklCity.DataBind(); } //} } catch (Exception) { // throw; } }