This is a migrated thread and some comments may be shown as answers.

Problem with ScriptManager EnableHistory and RadAjaxManager

3 Answers 182 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 2
Steve asked on 20 Aug 2011, 05:07 AM
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?

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 24 Aug 2011, 09:05 AM
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 >>

0
Dave
Top achievements
Rank 1
answered on 28 Feb 2012, 12:22 AM
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

0
Maria Ilieva
Telerik team
answered on 02 Mar 2012, 03:10 PM
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.
Tags
Ajax
Asked by
Steve
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Dave
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or