Description:
The blog is intended to demonstrate the use of some HTMLControls for dynamically generating the HTMLTable on webpage using some piece of code.
Required Namespace: System.Web.UI.HtmlControls
Controls used:
1. Two Textboxes (txtRow & txtCol)
2. One Button (btnClick)
3. One Blank Table (htmlTable1)
Procedure:
Step 1: Accept the no. of Rows and Columns from User.
int row = Convert.ToInt32(txtrow.Text); // No. of Rows
int col = Convert.ToInt32(txtcol.Text); // No. of Columns
Listing 1
Step 2: Now, Initialize the new TableRow & TableCell to add Data into Table.

Join the conversation! Your thoughts help the community grow.