Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to add another textbox. any one u tell me simple example?
Posted
Comments
Siva Hyderabad 20-Feb-14 2:27am    
photo bagumdi ra

With the given little info, I can answer your question like given below :
C#
Button_Click(object sender, EventArgs e)
{
    TextBox txt = new TextBox();
    txt.ID = "myTxt";
    this.Controls.Add(txt);
}


-KR
 
Share this answer
 
Comments
Sai Prasad anumolu 18-Feb-14 6:26am    
hi sir , I take one textbox and one add button , Button When i will click add button to display another textbox
Krunal Rohit 18-Feb-14 6:28am    
use txt.Enabled = true.
and I'm not sir :)

-KR
Sai Prasad anumolu 18-Feb-14 6:37am    
k thank u very much
Button_Click(object sender, EventArgs e)
{
TextBox newTxt= new TextBox();
newTxt.ID = "newTxt";
this.Controls.Add(newTxt);
}
 
Share this answer
 
Comments
Sai Prasad anumolu 18-Feb-14 6:38am    
thank u

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