Dynamically Loaded User Control in Dock with RadAjaxManagerProxy

2 posts, 0 answers
  1. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 21 Aug 2008 Link to this post

    Using Q2. I have a primary web page that has the appropriate ScriptManager and RadAjaxManager specified, and it contains my RadDockLayout and associated controls. None of the RadDockLayout controls or components are part of any AjaxSettings at this time. What I want to do is to be able to have the docks with Custom User Controls dynamically loaded, and have the User Controls support Ajax.

    I have no problem loading the control into the dock using LoadControl and dock.ContentContainer.Controls.Add (). It shows the appropriate User Control.

    In the User Control, I have added a RadAjaxManagerProxy and an asp:Button Control with an associated Click Event.

    When I execute the application, it loads the User Control into the dock appropriately, but this is what happens when I click the button. First time, it does an Ajax request back to the main page, in which you can tell that the button was click, but it does not call the Event. Second time, it performs a full postback and still doesn’t call the Event.

    Am I approaching the problem correctly, or should I use a different method to enable Ajax on my User Controls?

    Postback Information:

    __EVENTTARGET: Widget_fb737fde-18db-49b7-af25-8dd026920e78$C$ctl00$ButtonOk

    __EVENTARGUMENT:

      

     

  2. Dennis
    Dennis avatar
    62 posts
    Member since:
    Oct 2007

    Posted 21 Aug 2008 Link to this post

    Nevermind, I realized that I was changing the Control Id for the dynamically created control on postback causing it to not match the previous Control Id value. It couldn't find the dynamically loaded control because of the Id change. Thanks.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top