private SortedList AcessingDynamicControls() { SortedList sList = new SortedList(); dTable=new DataTable(); dTable.Clear(); dTable = MPostOfProperty.ReturnAmenitiesDetail("Select detail_id from CB_VIEW_Amenities"); for (int i = 0; i < dTable.Rows.Count; i++) { string ID; bool status; //CheckBox box = new CheckBox(); //box = this.FindControl(dTable.Rows[i]["id"].ToString()) as CheckBox; //ID = box.UniqueID; //status = box.Checked; CheckBox chk = (CheckBox)PanelAmenities.FindControl(dTable.Rows[i]["detail_id"].ToString()); string s = dTable.Rows[i]["detail_id"].ToString(); ID = chk.UniqueID; status = chk.Checked; sList.Add(ID, status.ToString()); } return sList; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)