Click here to Skip to main content
15,891,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii Experts

I am working on c# application now I want to add c# textbox and remove button dynamically when I press "add more" button.

now when I press remove button it will remove particular button and textbox.

Will any one help me to explain step by step process of this
Posted

1 solution

Create a new Windows Forms project. Put only one button on the form. Now open Form1.Designer.cs. There you can see the automatically generated code for your form. This is how the Visual Studio Forms Designer creates forms and controls in them.

Changing code in there has limited value because it will get overwritten the next time you change the slightest nouance in the designer and rebuild your project.

Instead learn from the code there what working code can look like.

Complicate the example at your will and try to do what you want to do in another project. You can have several instances of Visual Studio open at the same time, so switching between the "look here" project and the "trying that" is easy.
 
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