Dynamically adding Dropdown, Text Box and Add Button

  • Thread starter Thread starter Rocky
  • Start date Start date
R

Rocky

Hi Everyone,
I am facing a poblem in creating a row which contains following
scenario in ASP.NET

|DROP_DOWN_LIST | |TEXT_BOX| |ADD_Button| |REMOVE_Button|
------------------------------ -----------------
-------------------- --------------------------

When user will press ADD_Button then the same row will be populated in
next row. The situation can be explained as


|DROP_DOWN_LIST | |TEXT_BOX| |ADD_Button| |REMOVE_Button|
------------------------------ -----------------
-------------------- --------------------------

|DROP_DOWN_LIST | |TEXT_BOX| |ADD_Button| |REMOVE_Button|
------------------------------ -----------------
-------------------- --------------------------


When User will press Remove then that row will be removed. I thought to
do this by using Java Script but not able to have any good idea about
that.
If you guys faced similar situation or have some idea then please let
me know. I would really appreciate your help.

Thanking you.
Rocky
 
I don't think it would be a good idea to implement this in a client script.
Basically, there're two ways you can handle that:

1. Create a GridView control with Add and Delete functions, it's a built-in
functionality that would perefectly work
2. Write your own handler that would automatically add or delete rows from
an HTML table depending on what button was pressed.

HTH,
Andrey.
 
Back
Top