Click here to Skip to main content
15,904,288 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to create dynamic textboxes in asp.net,c#?

Thanks!
Posted
Comments
Kenneth Haugland 1-Oct-12 6:49am    
Huh? WHats a dynamic textbox?
ridoy 1-Oct-12 7:31am    
need to clear your question

1 solution

Hi
I believe, you want to create a textbox at run-time. If so, try following code in Page_Init.

C#
TextBox1 = New TextBox();
TextBox1.ID = "txtMyTextBox";
TextBox1.Style("Position") = "Absolute";
TextBox1.Style("Top") = "50px";
TextBox1.Style("Left") = "200px";
Form1.Controls.Add(TextBox1);


Hope that helps.

-Milind
 
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