Dynamic controls, placeholders, events, and pain

Last post 01-04-2006 6:21 PM by Tom.Smith. 0 replies.

Sort Posts:

  • Dynamic controls, placeholders, events, and pain

    01-04-2006, 6:21 PM
    • Participant
      1,055 point Participant
    • Tom.Smith
    • Member since 05-03-2003, 4:10 AM
    • Posts 211

    A helpful hint from someone who's already been there and done that:

    If all you want to do is pop in a control based on some other control, do it the easy way. Go ahead and add both controls just like always, but set the second control's visibility to false. Then set secondcontrol.visible = true in the first control's event handler. Once you're done with it, set visibility back to false again. With the second control invisible, it takes up no space on the page and looks like it isn't even there. End of pain, end of grief. This allows all the events to fire properly without jumping through a gazillion hoops wiring up event handlers and such.

    I've spent more hours on this topic than I'd care to admit, and this has saved me a lot of hair-pulling.

Page 1 of 1 (1 items)