HtmlGenericControl div2 = new HtmlGenericControl("div");//DIV declaration
protected void Page_Load(object sender, EventArgs e)
{
div2.ID = "div2";
HtmlButton btn = new HtmlButton(); //put some DIV controls just to see if its there
btn.ID = "btn1";
div2.Controls.Add(btn);
myTD.Controls.Add(div2);// Add it to the TableCell
}
protected void Button1_Click(object sender, EventArgs e)
{
//Here is, remove the DIV.
myTD.Controls.Remove(div2);
}
}