Adding controls at run time

  • Thread starter Thread starter Rajesh
  • Start date Start date
R

Rajesh

Hi,

I need to create a set of controls during the run time. Initially
the page should contain single row(column1: combo box, colomn2: text
box, column3: combo box and colomn4: button).

If i click the button(column4) during the run time the same set of
first row have to be generated, in the second row if i click the
button in the colomn4 then third row have to generated with same set
of controls.

Please tell me how to do this. If possible please send me the code or
link to do.

Thanks in advance.

Rajesh
 
Hi,

I need to create a set of controls during the run time. Initially
the page should contain single row(column1: combo box, colomn2: text
box, column3: combo box and colomn4: button).

If i click the button(column4) during the run time the same set of
first row have to be generated, in the second row if i click the
button in the colomn4 then third row have to generated with same set
of controls.

Please tell me how to do this. If possible please send me the code or
link to do.

Thanks in advance.

Rajesh

Hi,

Any one please help me
 
Simplest answer would be
Page.Form.Controls.Add(<new control >);

Looking at your question , you may want to order it as well, so....try
putting all your controls in a server side table to have complete control.

As an alternative, you may also want to try using javascript instead.
Reduces the amount of server-calls just to add another row to your page.

Hope that helps,
 
Back
Top