TAILIEUCHUNG - ASP.NET 4 Unleased - p 174

ApplicationLoadEventArgs đậu để xử lý sự kiện . Hỗ trợ các thuộc tính sau:. -Các thành phần mảng của các thành phần tạo ra kể từ lần cuối các sự kiện được nâng lên. . isPartialLoad-Chỉ có các trang là thực hiện trong bối cảnh của một postback không đồng bộ. | 1704 CHAPTER 38 Using Server-Side AJAX ApplicationLoadEventArgs Passed to the event handler. Supports the following properties components The array of components created since the last time the event was raised. isPartialLoad Indicates whether the page is executing in the context of an asynchronous postback. EndRequestEventArgs Passed to the event handler. Supports the following properties dataItems The data items registered with the method. error The error if any that occurred during the asynchronous postback. errorHandled Enables you to suppress the error. response The response associated with the asynchronous postback. NOTE You can detect whether a page is executing within the context on an asynchronous postback within client code by using the property. The page in Listing illustrates how you can take advantage of these event properties. The page contains two UpdatePanel controls. During an asynchronous call the border of the active UpdatePanel turns the color orange. When the asynchronous call completes the border of the updated UpdatePanel turns green. NOTE Later in this chapter you learn how to use the UpdateProgress control to display an UpdatePanel s progress. The method described in this section of handling client events directly is useful when you want to display a custom progress indicator. LISTING @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtml1 DTD script runat server protected void btnSubmit_Click object sender EventArgs e 200O sleep 2 seconds From the Library of Wow eBook Using the UpdatePanel Control 1705 script html xmlns http 1999 xhtml head runat server title UpdatePanelCustomProgress title style type text css .normal width 300px padding 10px margin .