I’m working with windows form application in vb.net windows form application in that there are two buttons:
- Add new Textbox
- Insert multiple textbox data into database
When I click on 1st button it will create new textbox and if I click on 2nd button than it should insert data of multiple textboxes in database.
Database has two fields only
- Id primary key
- Name
And textbox contains name.
Please suggest me the way to implement this i have no idea about this.
In your click-event assuming the ID-field is auto-incrementing in the database:
Then in your second click event:
(A data-grid can do this for you as well).
Also you can use an array to perform the creation, and you can interact with each textbox you create by its index.
Interact via something like: