Click here to Skip to main content
15,663,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how Create TextBox dynamically and how to retrieve text box value using and c#

You create dynamic textbox (or any control) as
TextBox myTextBox = new TextBox();
dynamictextbox.Text = "This is dynamically added text box";

Write this code in Page_Load.

To read value,
string myTextBoxValue = myTextBox.Text;

Hope that helps
Share this answer
1>first create object of text box or any control which you want to generate control
TextBox txt = new TextBox();

2>Pass value to object
txt.Text = "This is dynamically added text box";

3>add control in page
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900