Problem with asp loading sequences

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • arun.hallan@gmail.com

    #1

    Problem with asp loading sequences

    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 "NumberOfContro ls" 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 "numberofcontro ls" is set to 4.


    Now if i select "man", i want the dynamic addition of controls to
    happen first, so "numberofcontro ls" 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

Working...