Hey!
Just understand the concept of dynamic html table. Then you can do it
Problem Reason:
To elaborate on the above statement, the page is recreated each time it is posted back to the server. In other words, a new instance of the Page class is created and the class variables are set using the values from the ViewState. However during this recreation, the dynamically created controls are no longer available and hence the values are lost in the viewstate.
That's why it's showing null on submit (on postback time).
Solution
Simply You are missing one thing.... That is you need to define this code or method inside the Page_Init() or Page_Load().To override this behavior, you need to somehow make these controls available on each postback.
Like. Ex.
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
}
CreateDynamicTable();
}