Moving RadAjaxManager to MasterPage

3 posts, 0 answers
  1. jwhitley
    jwhitley avatar
    41 posts
    Member since:
    Oct 2006

    Posted 08 Aug 2013 Link to this post

    I need to add a RadAjaxManager to my master pages, and so need to remove them from the content pages.

    My questions is, the current RadAjaxManagers in the content pages have AjaxSettings code specific to the individual pages, detailing which controls get updates based on the control being accessed. How to I replicate this code for each page in the master page?

  2. jwhitley
    jwhitley avatar
    41 posts
    Member since:
    Oct 2006

    Posted 09 Aug 2013 Link to this post

    I now have this working (but not fully tested). Not sure it is the best approach, but..

    The RadAjaxManager now only appears on the master page. On the content page, where ajax settings are required, I have a public reference to the master page RadAjaxManager and call the RadAjaxManager.AjaxSettings.Clear(); method, then programmatically add them back using RadAjaxManager.AjaxSettings.AddAjaxSetting() method.

    Not sure if Page_Load is the right event to be doing it, or if clearing and reloading on every occurrence of the event is the best approach, but while no AjaxSettings need to be added in the master page itself, it seems to do the job.
  3. DevCraft R3 2016 release webinar banner
  4. Konstantin Dikov
    Konstantin Dikov avatar
    1744 posts

    Posted 13 Aug 2013 Link to this post

    Hello John,

    The Content page Page_Load event handler is the right place to add AjaxSettings to the RadAjaxManager, but you don`t need to call the AjaxSettings.Clear() method as this will remove every ajax settings in the manager. 

    For more information on ajaxifying controls in Master/Content page scenarios, please refer to the following help articles:

    Hope this helps.

    Best Regards,
    Konstantin Dikov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top