Click here to Skip to main content
15,922,407 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
initially i have one dropdown and textbox and add button control
After filling data in controls if i click on add button i has to generate dynamically another dropdown and textbox controls and add button for generating another set of dynamic controls
finally i will save all the data trough save button

i dont know how to complete this task help me?

This[^] may just help you.
Share this answer
You could either do this on the client with some JavaScript, cloneNode. Or on the server with something like this

protected void OnButtonClick(...)
   DropDownList ddl = new DropDownList();

   TextBox txt = new TextBox();

There is no need it either case to add more buttons. Keep in mind though with the server method you must keep track of and recreate each control that was dynamically added to the 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