Retaining dynamic controls on postback

M

mirin

Respected Gurus,

In my aspx page, I have a treeview control to which nodes and branches
are dynamically added based on user action. Each time the page is
submitted, the treeview remembers what node was added last and renders
it correctly. All of which is fine.

Now I have an asp table to which x number of rows are added
dynamically based on user query. Each row consists of an unbound
checkbox, an unbound text box and an unbound dropdownlist with values
fetched from a database. Now, on the click of a button I need to get
the values updated by the user for each row and perform some action
programatically. But the problem, as you might have guessed, is that
the dynamically added controls disappear on submit and hence no action
can be performed using the control values. Now I know that in order to
retain the controls and their values, I need to somehow keep track of
their properties and recreate them each time on postback. But I was
wondering whether there is any table or control similar to the
treeview control which could remember the child controls that have
been dynamically added to it? Or is there any trick I could employ
other than recreating the dynamic controls on each postback?

Many thanks,
Mirin
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top