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

AjaxManager works only one time

3 Answers 44 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Stan
Top achievements
Rank 1
Stan asked on 10 Aug 2011, 04:57 PM
I need to call page method from JavaScript:

protected void OnAjaxRequest(object sender, AjaxRequestEventArgs e)
 {            
     //TODO:
 

I added AjaxManager:
<telerik:RadAjaxManager id="AjaxManager" runat="server" OnAjaxRequest="OnAjaxRequest" />

and JavaScript function which is being called when checkbox is clicked:
function OnRowChecked(id, checkBox){
    var ajaxManager = $find("<%= AjaxManager.ClientID %>");
    if (ajaxManager != null)
        ajaxManager.ajaxRequest(id);
    else
        alert("No ajaxManager");
}

This works great - checkbox is clicked, JavaScript is called, page method is called. The only problem is that it works only one time. When second checkbox is clicked  AjaxManager is not found.  I could not add AjaxManager on Page_Init because of another weird javascript error.  This user control is deployed to SharePoint...

-Stan

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 15 Aug 2011, 10:07 AM
Hi Stan,

Could you please ensure that you are using the latest version of RadControls for ASP .Net Ajax. In the latest version we apply a fix namely for such issue cause by incorrect event creating of the RadAjaxManager. If you are up to date please try using regular asp UpdatePanel or RadAjaxPanel and verify of this makes any difference.


Best wishes,
Maria Ilieva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Stan
Top achievements
Rank 1
answered on 16 Aug 2011, 01:26 PM
Maria:

No, the version it is not the latest - 2010.2.713.35. Is there a hotfix I can apply?

-Stan
0
Maria Ilieva
Telerik team
answered on 17 Aug 2011, 01:30 PM
Hello Stan,

The fix is available in the latest official release Q2 2011 of RadControls. So I would suggest you to upgrade your application and verify of this works for you.

Regards,
Maria Ilieva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Ajax
Asked by
Stan
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Stan
Top achievements
Rank 1
Share this question
or