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

Weird RadAjaxManager Behavior

1 Answer 44 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Virgil Rodriguez
Top achievements
Rank 1
Virgil Rodriguez asked on 07 Oct 2009, 09:00 PM
Hi all,

What would cause program execution to keep switching between a Page_Load event and a RadAjaxManager_AjaxRequest event ? And sometimes even a function and a RadAjaxManager_AjaxRequest event?

I experience this when I try to debug my program, and as I am stepping through it, line execution keeps switching from one to the other. And not only that, after completing one round of switching between Page_Load and RadAjaxManager, the whole process is repeated not once, not twice, but at least 3-4 times.

Although I still get my desired results, without any noticeable delay, it sure is so much inefficient and very confusing to debug.

I would have wanted to paste my actual code but it is too big. I'm just wondering why this is happening and what should I consider doing so that the execution is more efficient and predictable.

Any feedback or help would be appreciated.

Thanks,
_______________
Virgil Rodriguez

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 12 Oct 2009, 11:10 AM
Hello Virgil,

When ajax request is performed the Page_Load is event is fired as in the case of regular postback. And the RadAjaxManager AjaxRequest event is fired when you have called the ajaxRequest() client-side method of RadAjax. A possible reason for the multiple page executions is if you have invoked a few ajax requests from the client for instance as below:

<script type="text/javascript">
function InitiateRequests()
{
    var manager = $find("<%= RadAjaxManager1.ClientID %>");
    manager.ajaxRequest("args");
    manager.ajaxRequest("args");
    manager.ajaxRequest("args");
}
</script>

Could you please check if this is the case?

Any additional information on your scenario might help us get to the source of the issue.

Regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Virgil Rodriguez
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or