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

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
 
G

Greg Young

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top