Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
UpdatePanel and ScriptManager ASP.NET AJAX Khung mở rộng khung ASP.NET thêm hỗ trợ cho một loại mới của postback trang cho phép những gì được gọi là trang dựng hình không đồng bộ một phần hoặc cập nhật. Vẽ trang một phần không đồng bộ được đặc trưng bởi các đặc tính sau đây: | UpdatePanel and ScriptManager The ASP.NET AJAX Framework extends the ASP.NET Framework to add support for a new type of page postback that enables what is known as asynchronous partial page rendering or updates. The asynchronous partial page rendering is characterized by the following characteristics The values of the form elements are posted through an asynchronous HTTP request allowing the end user to interact with the page while the request makes its way to the server and processed by the server-side code and the server response makes its way back to the client. The asynchronous nature of the client-server communications goes a long way to improve the interactivity responsiveness and performance of ASP.NET AJAX applications. When the server response arrives only designated portions of the page are updated and re-rendered. The rest of the page remains intact hence the name partial page rendering. ASP.NET AJAX developers must use UpdatePanel server controls to tell the ASP.NET AJAX Framework which regions of a page must be updated on an asynchronous page postback. Enabling Asynchronous Partial Page Rendering One of the great advantages of the ASP.NET AJAX partial page rendering feature is that you can enable it declaratively without writing a single line of client script. Enabling partial page rendering for an ASP.NET page takes two simple steps Add a single instance of the ScriptManager server control to the .aspx page Every ASP.NET page can contain only one instance of the ScriptManager server control. Add one or more UpdatePanel server controls to designate portions of the page that you want to have updated when an asynchronous page postback occurs Listing 19-1 presents a page that consists of two sections. The page uses an UpdatePanel server control to designate the top section as a partially updatable portion of the page. The bottom portion is an area of the page that can be updated only on a regular synchronous page postback. Chapter 19 UpdatePanel and .