This step-by-step article describes how to dynamically create controls for an ASPX Web page.
The sample project does the following:
It creates two TextBox controls.
It verifies that the TextBox contents (TextBox.text) and attributes are saved across posts to the server.
It describes how events that are posted by a dynamically created control are handled.
View Complete Post