求助!关于CHECKBOX
一段程序如下:
private void Button2_Click(object sender, System.EventArgs e)
{
int rowCnt;
int rowCtr;
int cellCtr;
int cellCnt;
rowCnt = int.Parse(TextBox1.Text);
cellCnt = int.Parse(TextBox2.Text);
for(rowCtr=1; rowCtr <= rowCnt; rowCtr++)
{
TableRow tRow = new TableRow();
Table2.Rows.Add(tRow);
for (cellCtr = 1; cellCtr <= cellCnt; cellCtr++)
{
TableCell tCell = new TableCell();
tRow.Cells.Add(tCell);
string prodID = rowCtr + "_" + cellCtr;
CheckBox Box = new CheckBox();
tCell.Controls.Add(Box);
Box.Text = rowCtr + ":" + cellCtr;
}
}
}
我该如何获得用户都选择了哪些CheckBox呢?