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

One RadAjaxManager in master page - issues?

15 Answers 744 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
SamVanity
Top achievements
Rank 2
SamVanity asked on 20 Nov 2007, 10:15 AM
Hi,

I am thinking about adding the AjaxManager to the master page instead of one manager for each page.

Is there any disadvantage of using a single RadAjaxManager performance wise? I have a common type for Masterpage so I don't have to use findcontrol.

In the help file,

6) RadAjaxManager and RadAjaxPanel at the same application

There are some known issues when using both the manager and the panel in some complex applications - MasterPage or WebUserControls. However, note that a single RadAjaxManager (and no panels) in the master/main page could handle all the scenarios.

What are the known issues? Since RadAjaxManager cannot ajaxify asp:panel anymore, it is not as easy to use as the RadAjaxPanel. I want to avoid any issues beforehand before I add a RadAjaxManager to my masterpage.

In addition, about RadCodeBlock:

What's the difference between using it and a regular asp:placeholder? If I enclose the <%=%> within a placeholder, it works as well. I need to know the advantage/disadvantage of using either performance wise. Since both are derived from UI.Control and don't have any additional functionalities... And since you don't have any info about it in the help file, I don't really see the point of having this extra control..

15 Answers, 1 is accepted

Sort by
0
SamVanity
Top achievements
Rank 2
answered on 20 Nov 2007, 04:03 PM
By the way, the RadManager in masterpage does not work.I have tried it, but while RadAjaxManagerProxy does work declaratively, it cannot be used programmatically.

Master.AjaxManager.AjaxSettings.AddAjaxSetting(SomeCtl, SomeCtl)

works ok.

RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(SomeCtl, SomeCtl)

returns an error while performing ajax postback

Sys.InvalidOperationException , could not find updatepanel........ If it is being updated dynamically then it must be inside another UpdatePanel
0
Konstantin Petkov
Telerik team
answered on 21 Nov 2007, 12:06 PM
Hi Sam,

Thank you for these questions.

1)
I am thinking about adding the AjaxManager to the master page instead of one manager for each page.

Is there any disadvantage of using a single RadAjaxManager performance wise? I have a common type for Masterpage so I don't have to use findcontrol.


I believe this is the best approach -- access the AJAX Manager through a property from the MasterPage. No, there are not any disadvantages so feel free to follow this approach.

2)
RadAjaxManager and RadAjaxPanel at the same application

What are the known issues?


There are several scenarios having both panel and manager in the same application, which throw errors and are hard or even impossible to resolve over ASP.NET AJAX base. Therefore, we recommend to use RadAjaxPanel in simple implementations only and leave the manager-only approach for the more complex scenarios.

3)
In addition, about RadCodeBlock:

What's the difference between using it and a regular asp:placeholder?


Very good question! Actually there are no differences for the time present -- you can use either the placeholder or RadCodeBlock. We may however include additional functionality in RadCodeBlock in future, which the placeholder will miss.

4)
RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(SomeCtl, SomeCtl)

returns an error while performing ajax postback


RadAjaxManagerProxy has "codeless purpose" -- it should help developers AJAX-enabling their applications design-time only. This is the reason we have not added AjaxRequest events for the proxy for example -- if you need some code, you can get the master manager instance and use it instead.

I hope this information helps.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
UT_DEV
Top achievements
Rank 1
answered on 28 Nov 2007, 09:14 AM
One more,
 
Whats  the main advantage of RadAjaxPanel instead of typical asp:updatepanel placeholder?
0
Steve
Telerik team
answered on 28 Nov 2007, 09:30 AM
Hello Ilya Frolov,

There is no advantage in the real sense of the word. Our RadAjaxManager is enough to cover all your ajax needs, RadAjaxPanel is merely a counterpart for something that MS AJAX already offers that can be used for simpler scenarios.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
UT_DEV
Top achievements
Rank 1
answered on 28 Nov 2007, 01:07 PM
And will it support client side Validators in Q3 release?
0
Vlad
Telerik team
answered on 30 Nov 2007, 04:08 PM
Hello Ilya,

We will do our best to include validators fix in Q3.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Davis
Top achievements
Rank 2
answered on 30 Apr 2008, 09:41 AM
I had a web app that worked ok with RadControls for ASP.NET Q1 2008.
I am trying to convert to RadControls for ASPNET AJAX Q1 2008.
Before I had RadAjaxManager in the master page. But now, even when I have removed all references to RadAjaxManager in the code, I get the following error.  (When I do a global search I find no mention ofRadAjaxManager in the code.)  How can I resolve this error?

*************
 

Server Error in '/' Application.

Only one instance of a RadAjaxManager can be added to the page!

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Only one instance of a RadAjaxManager can be added to the page!

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Only one instance of a RadAjaxManager can be added to the page!]
   Telerik.Web.UI.RadAjaxControl.OnPageInit(Object sender, EventArgs e) +163
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnInitComplete(EventArgs e) +2062312
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +963


Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
0
Konstantin Petkov
Telerik team
answered on 30 Apr 2008, 11:49 AM
Hello John,

The error is indeed thrown when you have more than one instance of RadAjaxManager and it often appears in MasterPage scenario with a manager instance in the content page.

For design-time purposes we have provided a new RadAjaxManagerProxy control, which can be added into the ContentPages. You will find an example here:

http://www.telerik.com/demos/aspnet/prometheus/Ajax/Examples/Manager/MasterPage/DefaultCS.aspx

Please, check if you add a manager instance in the code-behind as well.

Kind regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Davis
Top achievements
Rank 2
answered on 30 Apr 2008, 04:11 PM

Konstantin Petkov

Thank you for your prompt reply.
But maybe you did not notice in my post,
I DELETED ALL CODE THAT MENTIONS RadAjaxManager.

So I do not understand why I still get this error message.
I cannot do any work on the project until it is resolved.

John

0
Konstantin Petkov
Telerik team
answered on 30 Apr 2008, 04:27 PM
Hi John,

Unfortunately I have no idea what is causing this error as well. Therefore, I will kindly ask you to submit a regular support ticket from your Client.NET account sending a runnable sample web application which replicates the problem. We will investigate the issue locally and get back to you with our findings.

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Davis
Top achievements
Rank 2
answered on 30 Apr 2008, 04:49 PM
Thank you for your response.  I wondered if you had addressed this problem previously.

Because my project is big I will try to reproduce the problem in a smaller project before sending it.

John
0
John Davis
Top achievements
Rank 2
answered on 01 May 2008, 02:12 AM

Konstantin Petkov

Although I have not yet determined exactly what was wrong I isolated the problem and now I can continue working on the project.
With 2 particular user controls removed from the project it would run without the error.

Later I will re-build these user controls from scratch and problably the problem will be gone.
If this kind of problem happens to others I recommend deleting all pages or user controls from the project and adding them one by one or in groups until you can isolate the problem.
Because the error message does not provide any indication of where the problem occurred.

John

0
Konstantin Petkov
Telerik team
answered on 01 May 2008, 06:42 AM
Hi John Davis,

Thank you for sharing this information. I hope it can help someone else as well.

I believe the error should not popup on recreating the pages. Let us know if you need further assistance.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sam
Top achievements
Rank 2
answered on 23 Feb 2016, 05:01 AM

Maybe a decade late .... 

A RadToolTipManager when present in a content page with RadAjaxManagerProxy, and having a master page with RadAjaxManager - throws this error (Only one RadAjaxManager can be added to a single page).

<telerik:RadToolTipManager ID="RadToolTipManagerMain" runat="server" 
                AutoTooltipify="True" HideEvent="LeaveTargetAndToolTip" Skin="Sunset"></telerik:RadToolTipManager>

0
Maria Ilieva
Telerik team
answered on 24 Feb 2016, 02:08 PM
Hello Sam,

Please make sure that you have only one RadAjaxMnager control in the application and use only RadAjaxManagerProxy controls in any other pages.

Regards,
Maria Ilieva
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Ajax
Asked by
SamVanity
Top achievements
Rank 2
Answers by
SamVanity
Top achievements
Rank 2
Konstantin Petkov
Telerik team
UT_DEV
Top achievements
Rank 1
Steve
Telerik team
Vlad
Telerik team
John Davis
Top achievements
Rank 2
Sam
Top achievements
Rank 2
Maria Ilieva
Telerik team
Share this question
or