Dynamic Creation of Controls

Unknown | 6:41 AM |

protected void btninsert_Click(object sender, EventArgs e)
{
int count =Convert.ToInt32(TextBox1.Text);
Panel1.Controls.Clear();
Table tb = new Table();
tb.GridLines = GridLines.Both;
for (int i = 0; i < count; i++)
{

TableCell c1 = new TableCell();
TableRow rw = new TableRow();
TextBox tx = new TextBox();
c1.Controls.Add(tx);
rw.Cells.Add(c1);
tb.Rows.Add(rw);
}
Panel1.Controls.Add(tb);
}

Category:

About http://dotnetvisual.blogspot.in/:
DOT NET TO ASP.NET is a web application framework marketed by Microsoft that programmers can use to build dynamic web sites, web applications and web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime, allowing programmers to write ASP.NET code using any Microsoft .NET language. create an application very easily ....