Modal Popup, Custom Controls, and the ASP.NET Wizard control

Posted on 2009-04-16
Last Modified: 2013-11-08
I am using ASP.NET 3.5 and I have a page that has an ajax modal popup window. In the modal popup their is a PlaceHolder. I am trying to dynamically add a user control that contains a Wizard control to this placeholder.
Everything appears to work but as soon as I click a button in the Wizard control the sidebar and/or the entire user control disappears. This thing works fine with login controls and static controls, just not with the wizard control. Any help would be greatly appreciated.
I have really been pulling my hair out on this one.
I added the relevant code in an attachment rather than trying to stick it all in here.

Open in new window
Question by:Dixon8402
    LVL 9

    Expert Comment

    You need to re-create dynamic controls on page_init to get events hooked up correctly.

    Author Comment

    I fully understand that. Everything is working fine with my login control since all I have to do is re-register the authenticate event on every postback. The problem is that the Wizard control is much more complicated and I cannot figure out which events need registered.

    Author Comment

    If anyone wants the entire solution to look at or test let me know your email and I will be happy to send it.
    LVL 9

    Expert Comment

    Can you send me your solution. If I can be for any help.
    teemu(dot)torvikoski (at) gmail(dot)com
    LVL 9

    Accepted Solution

    Hi Dixon,

    did you get your problem solve with the suggestion I send?

    The suggestion was basically to reload dynamically created user controls into control tree by using LoadControl method.

    Similar issue/answer can be found from:

    Author Closing Comment

    Sorry for not accepting soon, got caught up in some other things but you were definitely on point. I was doing the LoadControl method at the beginning then throwing everythign in  a session variable.
    I didn't realize I have to use LoadControl on every postback. THanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video discusses moving either the default database or any database to a new volume.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now