How to re-create dynamically added controls without having duplicates?

  • Thread starter Thread starter keithb
  • Start date Start date
K

keithb

I have found that I must re-create dynamically added controls on every
postback in order to find and access them programatically. The controls I am
working with are inside a GridView control. When the edit button is clicked,
a postback occurs and the control are re-created. This causes an additional
set of columns to be created in the GridView control, so that all of the
dynamically added controls exist in 2 places on the screen. How can I
recreate the controls on postback without having duplicates?

Thanks,

Keith
 
Perhaps if you are getting duplicates (i.e. the original ones are showing
up) your original statement about always needing to re-create dynamic
controls is wrong.

Cheers,

Greg
 
Back
Top