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

[Solved] RadAjax Panel INSIDE Dynamically Loaded Controls

4 Answers 207 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
John Brownell
Top achievements
Rank 1
John Brownell asked on 17 Jan 2008, 09:22 PM
RadAjax Prometheus does a full-page postback (not ajaxified) when the control is dynamically loaded in the page_load event. But this works in both the non-prometheus RadAjax version and when using the ASP.NET AJAX UpdatePanel.

A simple example ...

- create an ascx control (WebUserControl.ascx)
- add an ajax panel with some test action inside of it

- create an aspx page
- add a placeholder control called "ph"
- in page_load, add:
Control ctl = LoadControl("~/WebUserControl.ascx");
ph.Controls.Add(ctl);

You will see that the AJAX functionality is borked.

Next, replace the promethus ajax panel with a non-prometheus panel, or and ASP AJAX UpdatePanel, and you'll see that it works.

I have seen the example located here:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Ajax/Examples/Common/LoadingUserControls/DefaultCS.aspx

But, in the example, the ajax panel is location in the ASPX page and the user control is loaded inside of it. The problem I am describing happens when you include the AJAX panel *inside* of the user control.

Any suggestions?

Thnaks!
John
Pyron Technologies

4 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 18 Jan 2008, 04:50 PM
Hi John Brownell,

In order to achieve the desired functionality with the Prometheus RadAjaxPanel we would suggest you to load the user control dynamically on Page_Init instead of on Page_Load.

Hope this helps.


Sincerely yours,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Brownell
Top achievements
Rank 1
answered on 18 Jan 2008, 08:10 PM
Ok... that works.

But are you saying that this is the intended behavior? It is fundamentally different from how both the non-prometheus RAD AJAX panel and the ASP>NET AJAX UpdatePanel work.

For example, I have a large project broken up into several libraries, with base classes for pages, controls, master pages, etc. All of my user controls are loaded dynamically. Changing them all to load during INIT instead of LOAD is a pretty major undertaking because it will be affected by the timing of everything else in my application.

Also, moving the control loading into INIT brings up other issues. Suddenly I cannot use <%=  %> script blocks in any of the markup. As you can see, this is kind of a showstopper for me. Can you tell me if this is something that will be considered a bug and get fixed at some point? Or is this behavior intentional?

Thanks,
john
Pyron Technologies
0
Giuseppe
Telerik team
answered on 22 Jan 2008, 04:30 PM
Hi John,

Indeed on further investigation our developers were able to streamline the behavior of the Prometheus Ajax component with RadAjax for ASP.NET and MS UpdatePanel. You can find an unofficial custom build that achieves the desired effect in the other support ticket you have opened on the same topic as we cannot attach dev versions in the public forum.

Hope this helps.


Greetings,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Brownell
Top achievements
Rank 1
answered on 24 Jan 2008, 12:14 AM
This is great! You guys rock! 

I really appreciate the custom build. I tested it and it does resovle this issue and will be a great help to me. I think I found one or two other discrepancies, but nothing that prevents me from using it in production. Now I feel like I can start migrating my entire project to the prometheus set of tools.

Please pass along my kind words to other coworkers/developers/etc...

Thanks again!

John
Pyron Technologies
Tags
Ajax
Asked by
John Brownell
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
John Brownell
Top achievements
Rank 1
Share this question
or