protected void cmdCreate0_Click(object sender, EventArgs e) { table1.Controls.Clear(); int rows = Int32.Parse(txtRows.Text); int cols = Int32.Parse(txtCols.Text); for (int row = 0; row < rows; row++) { TableRow rowNew = new TableRow(); table1.Controls.Add(rowNew); for (int col = 0; col < cols; col++) { TableCell cellNew = new TableCell(); TextBox txtContent = new TextBox(); cellNew.Controls.Add(txtContent); if (chkBorder.Checked) { cellNew.BorderStyle = BorderStyle.Inset; cellNew.BorderWidth = Unit.Pixel(1); } rowNew.Controls.Add(cellNew); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)