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

Combining RadControls for ASP.net with RadControls for ASP.NET AJAX

7 Answers 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 1
Veteran
Morten asked on 18 Jun 2008, 10:21 AM

Hi,

Is it possible to combine components for “ASP.NET AJAX (Prometheus)” with components for “ASP.NET”? We are upgrading the RadControls on a site from “ASP.NET” to “ASP.NET AJAX” but have some difficulties when changing some of the components.

 For example we have a “telerik:RadMultiPage” holding a dynamic loaded usercontrol with a “radA:RadAjaxPanel” but when the usercontrol posts back we get this AJAX error:

 “Unexpected ajax response was received…”

7 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 18 Jun 2008, 10:56 AM
Hello Morten71,

Basically, RadControls for ASP.NET and RadControls for ASP.NET AJAX can co-exist, however we recommend using merely controls from a single suite since this will provide more seamless interoperability between them and their client API coding conventions are guaranteed to be unified. Hence this will reduce to a great extent the learning curve for a developer which is not familiar with our products.

Can you please clarify what do you mean by "have some difficulties when changing some of the components"? Have you followed the instructions from the "Migrating [RadControls] for ASP.NET to ASP.NET AJAX" and examined the Client-side API reference section from the documentation of each of these controls? This should help you replace the classic versions of our products with their ASP.NET AJAX counterparts.

Additionally, concerning the error you receive when loading user control dynamically with RadAjax:
Double-check that you followed the rules for runtime user control load depicted in the resources below:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Ajax/Examples/Common/LoadingUserControls/DefaultCS.aspx
http://www.telerik.com/help/aspnet-ajax/ajxloadusercontrols.html

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Morten
Top achievements
Rank 1
Veteran
answered on 18 Jun 2008, 10:54 PM

Hi Stephen.

The links you sent to me helped building the dynamic controls and everything works fine - until I AJAXIFY the page using RadAjaxPanel. I think that the problem has something to do with the “Javascript block” in the dynamic loaded user controls (strange, but the problem doesn’t affect the first loaded user control, only the user controls loaded when I click on a tab different from the first tab…).

If I add this code in my dynamic loaded user control javascript works fine:

<input type="button" onclick="alert(‘test’)" />   

If I instead move the content from the onclick event to a function inside the dynamic loadet user control I get a javascript error:

<script type="text/javascript">

   function test(){

     alert("test")

   }

</script>

<input type="button" onclick="test()" />

If I move the javascript function away from the user control (to the page holding my user control) I don’t get the Javascript error. Any ideas? How do I deal with Javascript functions on dynamic loaded user controls when ajaxified?

0
Morten
Top achievements
Rank 1
Veteran
answered on 18 Jun 2008, 11:18 PM
Hi,

I found a solution for the javascript problem. I had to add this around the jabascript block:

<

telerik:RadScriptBlock ID="RadCodeBlock1" runat="server">
  <script type="text/javascript">
    ...
  </
script>
</telerik:RadScriptBlock>

0
Morten
Top achievements
Rank 1
Veteran
answered on 19 Jun 2008, 10:10 AM

Hi Stephen.

Unfortunately there are still something that doesn’t work…

On one of the dynamic loaded controls holds a radgrid.

-          If I delete a row in the radrid the grid doesn’t update/refresh. Also the RadTabStrip stops working and I get a Javascript error when I click a tab.

-          If I click on the radgrids column headers to sort rows they get sorted as they are supposed to (and the grid updates so everything looks fine) but also here the RadTabStrip stops working and I get a Javascript error when I click a tab. 

Any ideas?

0
Sebastian
Telerik team
answered on 20 Jun 2008, 01:06 PM
Hello Morten71,

It seems that the some internal/external javascript logic is not evaluated properly after an ajax request.

Can you please disable temporary the ajax and load the user controls with plain postbacks to see the result? What the message of the errors you receive after grid refresh/sort states? The answers to these questions can help us identify the cause of the issue to address it accordingly.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ben.grossman
Top achievements
Rank 1
answered on 25 Jun 2008, 07:30 PM
"Basically, RadControls for ASP.NET and RadControls for ASP.NET AJAX can co-exist"

Could you point me in the right direction of how to do this?  Mainly we want to be able to use the new controls on new pages in our project but would rather not change the pages which are already functioning with the Radcontrols for ASP.NET.  We would like to migrate when we have the time but for now we'd like to be able to use the new controls on new pages within the project.
0
Sebastian
Telerik team
answered on 26 Jun 2008, 07:45 AM
Hi Ben,

If you intend to migrate your application on separate phases and use the new controls from the ASP.NET AJAX suite for new development, merely add the Telerik.Web.UI/Telerik.Charting assemblies to the /bin folder of your existing web site and design/configure your new pages with our ASP.NET AJAX components. Furthermore, verify that your web.config file is updated accoringly to make your web site AJAX-enabled:

http://www.telerik.com/help/aspnet-ajax/troubleshooting.html

Still we strongly recommend using controls from a single suite and migrating the Classic version of the products to their ASP.NET AJAX counterparts as soon as possible (following the guidelines from the documentation).

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Morten
Top achievements
Rank 1
Veteran
Answers by
Sebastian
Telerik team
Morten
Top achievements
Rank 1
Veteran
ben.grossman
Top achievements
Rank 1
Share this question
or