I am creating a table based on a query from a database. Each cell of the table contains a checkbox. The user can check any number of those boxes. Once they are done, they click a button... at which point I am trying to read through the table and see what is checked... However, the table no longer can be reference. Does anyone know what I could do??<BR><BR>Here is the code (I am new to asp.net and c#, so hopefully the code is not too hacked!):<BR><BR>//CREATING THE TABLE HERE<BR>public void PopulateTable(string UnitID)<BR>{<BR>string cnstr = ConfigurationSettings.AppSettings"myOracleConn"];<BR>string SQL = "SELECT * from item , item_type where item_type = item_type_id and item_id = " + UnitID;<BR> DataTable UnitInfoDataTable = myHelper.GetTable(SQL,cnstr);<BR><BR> SQL = "SELECT * from contents where item_id = " + UnitID;<BR> DataTable UnitContentDataTable = myHelper.GetTable(SQL,cnstr);<BR> UnitLayoutTable.Rows.Clear();<BR> int UnitRows = Convert.ToInt32(UnitInfoDataTable.Rows[0]["Row_Count"]);<BR> int UnitCols = Convert.ToInt32(UnitInfoDataTable.Rows[0]["Col_Count"]);<BR> <BR> for (int i = 1; i &#060;= UnitRows; i++)<BR> {<BR> TableRow TableRow = new TableRow();<BR><BR> for (int m = 1; m &#060;= UnitCols; m++)<BR> {<BR> TableCell TableCell = new TableCell();<BR> TableCell.CssClass = "medtext";<BR> CheckBox CheckBox = new CheckBox();<BR> CheckBox.ID="Row" + i + "Col" + m;<BR> CheckBox.Checked=false;<BR> TableCell.Controls.Add(StorageLocationCheckBox);<B R> TableCell.Style.Add("cursor","hand");<BR> <BR> if (UnitContentDataTable.Rows.Count &#062; 0)<BR> {<BR> for (int n=0; n&#060;UnitContentDataTable.Rows.Count;n++)<BR> {<BR> if (i == Convert.ToInt32(UnitContentDataTable.Rows[n]["Grid_Row"]) && m == Convert.ToInt32(UnitContentDataTable.Rows[n]["Grid_Col"]))<BR> {<BR> if (UnitContentDataTable.Rows[n]["Content_ID"].ToString()==Request.QueryString["ID"])<BR> {<BR> CheckBox.Checked=true;<BR> <BR> TableCell.Controls.Add(CheckBox);<BR> TableCell.Style.Add("cursor","hand");<BR> }<BR> else<BR> {<BR> TableCell.Text = UnitContentDataTable.Rows[n]["Content_ID"].ToString();<BR> TableCell.Style.Add("cursor","normal");<BR> }<BR> }<BR> }<BR> }<BR> TableRow.Cells.Add(TableCell);<BR> }<BR> UnitLayoutTable.Rows.Add(TableRow);<BR> }<BR> }<BR><BR><BR>//THE USER WANTS TO SAVE THE INFORMATION<BR>protected void AssignToUnitButton_Click(object sender, System.EventArgs e)<BR> { foreach(TableRow UnitLayoutTableRow in UnitLayoutTable.Rows)<BR> {<BR> foreach(TableCell TableCell in UnitLayoutTableRow.Cells) <BR> {<BR> CheckBox CheckBox = (CheckBox)TableCell.Controls[0];<BR> if(CheckBox.Checked == true)<BR> {<BR> DoSomething();<BR> }<BR> }<BR> }<BR> }<BR><BR><BR>I&#039;ve tried some other things as well in order to try to reference the table, but have been unsuccessful. <BR><BR>Thanks in advance.