Problems with asp loading sequences

A

arun.hallan

I 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!?
 
A

arun.hallan

O, and i have tried other methods, without using the NumberOfControls
variable, but then the system doesnt link the controls together and
instead double the controls are added to the form/
 
A

arun.hallan

Sorry to bump this.

Does anyone have any idea? I can't really progress unless i get this
sorted.

Or unless i change my whole direction.
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top