I've tried the aspnet forum, but no one could answer my Q.
I hope someone here can:
had the problem of accessing controls that i had added on the fly.
I had a look at the following webpage:
http://www.codeproject.com/aspnet/retainingstate.asp , which worked.
However i have the following problem: depending on what item a user
selects from a combo box, the "NumberOfControls" variable changes.
What i want to happen is that the dynamic controls are created, and
then the second creation on controls happens. The problem is, this
sometimes happens backwards.
The reason why this is a problem is as so:
Imagine the combo selects between "man" and "dog".
If i select dog, then 4 "leg" controls are added.
If correctly "numberofcontrols" is set to 4.
Now if i select "man", i want the dynamic addition of controls to
happen first, so "numberofcontrols" is set to 2.
What sometimes happens, is that the second creation of controls
actually happens first, it tries to create 4 "legs" instead of 2, and
the system crashes.
Can anyone help!?
Reply