PageAsyncTask Page Examples (Asynchronous asp.net Pages)

From my understanding, after reading about ASP.NET asynchronous pages, the method that executes when the asynchronous task starts is ALWAYS PERFORMED between pre-rendering and pre-rendering events. So, since page control events are fired between page load and prerender events, is it true that no matter what the initial task handler creates (the handler for BeginAsync below), it cannot be used in control events? So, for example, if a handler retrieves data from a database, cannot the data be used in any of the control postback events? Could you bind data to data management after prerender?

PageAsyncTask pat = new PageAsyncTask(BeginAsync, EndAsync, null, null, true);
this.RegisterAsyncTask(pat);
+3
source share
1 answer

Completely ignoring Guff’s response, has not yet received a sufficient reputation to vote for him, but he is completely misleading and terribly mistaken. Link by Tony_Henrich is very good, and here is another equal utility: http://msdn.microsoft.com/en-us/magazine/cc163725.aspx

All DataSource controls are automatically bound after Page_PreRender (if it wasn’t manually before) - yes, you can bind data in all event handlers PageAsyncTaskor even in Page_PreRenderComplete(which is launched only after each PageAsyncTaskor time-outs are completed).

PageAsyncTask , -, , , CPU ( ).

, , PageAsyncTask - , , PageAsyncTask, ( ), - , IIS , ( , , ).

+7

Source: https://habr.com/ru/post/1735837/


All Articles