1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Panel5.Controls.Clear();
int tblRows = CheckBoxList1.Items.Count;
int tblCols = this.Columns;
Table tbl = new Table();
Panel5.Controls.Add(tbl);
TableRow tr = new TableRow();
for (int j = 1; j <= tblCols; j++)
{
TableCell tc = new TableCell();
LinkButton txtBox = new LinkButton();
txtBox.Text = "";
txtBox.Width = 15;
txtBox.Height = 18;
tc.Attributes.Add("Style", "background-color:#FF9966");
tc.Enabled = false;
txtBox.ID = j.ToString();
tc.Controls.Add(txtBox);
txtBox.Attributes.Add("runat", "server");
txtBox.Click += new System.EventHandler(txtBox_Click);
tr.Cells.Add(tc);
tbl.Rows.Add(tr);
}
UpdatePanel1.ContentTemplateContainer.Controls.Add(tbl);
Panel5.Controls.Add(tbl);
tbl.ToolTip = "ok"; |
Partager