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

RadAjaxPanel not really asynchronus?

2 Answers 65 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
chofra03
Top achievements
Rank 1
chofra03 asked on 20 Apr 2010, 08:15 PM
Hi , maybe this explanation will be better.

I am using RadAjaxManager for the purpose of callback...
I have one WebForm1.aspx page, inside that there is two WebUserControl (WebUserControl1.ascx, WebUserControl2.ascx).
Also, in WebForm1.aspx page I have three buttons (btnCallBack) which does the callbacks. The Button1 will perform a callback only to update the WebUserControl1.ascx. The Button2 will perform a callback only to update the WebUserControl2.ascx. Finally, The Button0 will perform a callback to update both of the WebUserControl.
 
Both WebUserControl have nothing in it, only a System.Threading.Thread.Sleep() call in their respective Page_Load.
WebUserControl1.ascx is having a Thread.Sleep(2000) and  WebUserControl2.ascx is having a Thread.Sleep(8000).

Now when i click Button0, I can see two AjaxLoadingPanel over each WebUserControl. Since each WebUserControl have a different sleep time, I would expect that the AjaxLoadingPanel of WebUserControl1 disapear before the AjaxLoadingPanel of WebUserControl2. Therefore, both AjaxLoadingPanel disapear at the same time. 

Now when i click Button1, and then click immediatly  Button2, AjaxLoadingPanel will appear for WebUserControl1 but not for WebUserControl2. The AjaxLoadingPanel for WebUserControl2 will appears only after the AjaxLoadingPanel for WebUserControl1  dissappear. Why?

I have attached a exemple of my RadAjaxManager. Is there any client-side code or server-side code to achieve what I would expect.
Thanks,




2 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 20 Apr 2010, 09:47 PM
The reason for that is because RadAjaxManager can only perform one ajax request at a time, thus the reason it waits for the first ajax request to finish before it can perform the second ajax request.

If you want them to perform a separate request, in an asynchronous way I would suggest using the RadXmlHttpPanel control. Since your using callbacks, this control performs an ajax callback and I think would suit your situation better.

I hope that helps.
0
chofra03
Top achievements
Rank 1
answered on 20 Apr 2010, 10:08 PM
Well, I'm presently updating a page using .NET Framework 1.1. Does this control is available for .NET 1.1 within ASP.NET AJAX 2009?


Tags
Ajax
Asked by
chofra03
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
chofra03
Top achievements
Rank 1
Share this question
or