Problem with ScriptManager EnableHistory and RadAjaxManager

4 posts, 0 answers
  1. Steve
    Steve avatar
    60 posts
    Member since:
    Nov 2006

    Posted 20 Aug 2011 Link to this post

    Here's the scenario:
    • MasterPage being used with RadAjaxManager and ScriptManager, the EnableHistory property of ScriptManager set to "true".
    • Page inheriting master has ScriptManagerProxy where OnNavigate event is being handled to read when user clicks 'Back' button.
    • Page has different buttons that cause ajax postbacks where I'm grabbing important info and using ScriptManager.AddHistoryPoint to maintain those values.
    • When user navigates back to my page, the OnNavigate fires and all my important info is there in the HistoryEventArgs.State.  I manually call to update form controls to account for that important info and, even though method calls appear to run successfully, form controls are not actually updated.

    Seems like a typical AJAX scenario where some ajax setting is not set correctly but, in this case, I have no idea how I would setup ajax to update the necessary controls when OnNavigate fires.  Not even sure if I understand why ajax settings would be an issue.  I mean, we're talking about the initial page load.  Why wouldn't the controls that I'm clearly setting to certain values actually show those values on screen?
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 24 Aug 2011 Link to this post

    Hi Steve,

    Try adding a setting to the RadAjaxManager where the ScriptManager updates the controls which you want to be updated after the OnNavigate event and see if it makes any difference. Note that you might need to add the settings dynamically, as the ajax initiator should be the true Scriptmanager, not the ScriptManagerProxy.

    Regards,
    Iana
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Dave
    Dave avatar
    21 posts
    Member since:
    Jan 2005

    Posted 27 Feb 2012 Link to this post

    I an into this today and its really quite annoying.  Why cannot the RadAjaxManager figure out that when a control dependcy is on the ScriptManagerProxy to do it correctly, and register the AjaxSetting on the actual ScriptManager, and not the proxy? 

    Not familiar with the internals of your code, but it seems a simple thing to do.

    Fixing this would allow declarative ajax settings, rather than having to code them by hand in Page_Load.  Plus I'm sure a lot of people have hit this issue, logically assuming that they put the ScriptManagerProxy (since its the only one in scope) in the AjaxSettings block and then finding it doesn't work with no clear reason why.

    Thanks,
    Dave

  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 02 Mar 2012 Link to this post

    Hi Dave,

    I will forward the request you are proposing to our dev team so they could further discuss if this could be implemented in the RadAjaxManager control's code.
    However note that the RadScriptManagerProxy class is a separate class and it does not directly inherit from the main RadScriptManager, so automatic recognition of the main RadScriptManager form the RadAjaxManager in this case would be very difficult.

    Greetings,
    Maria Ilieva
    the Telerik team
    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 their blog feed now.
Back to Top