2012年3月10日土曜日

Run javascript automatically when updateprogress is shown

Hi,

you could use the PageRequestManager class, from the library, which exposes several interesting events:

PageRequestManager event

Description

initializeRequest

Raised before processing of the asynchronous request starts. You can use this event to cancel a postback.

beginRequest

Raised before processing of an asynchronous postback starts and the postback is sent to the server. You can use this event to set request headers or to begin an animation that indicates that the page is processing.

pageLoading

Raised after the response from the server to an asynchronous postback is received but before any content on the page is updated. You can use this event to provide a custom transition effect for updated content.

pageLoaded

Raised after all content on the page is refreshed, as a result of either a synchronous or an asynchronous postback. You can use this event to provide a custom transition effect for updated content.

endRequest

Raised after an asynchronous postback is finished and control has been returned to the browser. You can use this event to provide a notification to users or to log errors.

http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/default.aspx

Grz, Kris.

0 件のコメント:

コメントを投稿