Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Theo mặc định, thư mục Tài liệu tham khảo có chứa tham chiếu đến System.dll, System.Data.dll, System.Web.dll, System.Web.Services dll, và các tập tin System.XML.dll. AssemblyInfo.vb Các tập tin có chứa các siêu dữ liệu cho các hội đồng cần thiết cho một dịch vụ Web. Siêu dữ liệu này bao gồm các thông tin như tên | the Location attribute is set to Any which enables ASP.NET applications to cache data on any client-enabled device. However if you want to use a specific device for caching data you can specify Client Downstream or Server. If you do not want caching enabled for a Web form you can specify the value None. VaryByParam. Consider a scenario in which you have enabled caching for a Web form Article.aspx. The Web form accepts the article ID from the query string and retrieves data for the article. When the page is requested for the first time the article with ID 1 is loaded. This page will be cached. If another user requests the same form with article ID 2 the cached page will not be loaded because the cache represents the article with ID 1. To avoid loading cached data when the value passed in the query string is different you can specify the query string key in the VaryByParam attribute. Therefore in this case you should specify ArticleID for the VaryByParam attribute. To implement page-output caching use the Article.aspx page of the MySourceCode application. See Chapter 10 Managing Data from ASP.NET Applications for more information on how the Article.aspx page was created. Ofkih Ariĩlo TtpK pagflj I kdri ici n IWRnlrpy-JwrP L b ThK lahil dtsplayi ĩhp rim when the page W.M 1.1-rl k idfl i Trw hibri hirt beer- added Silly líi W rhA page w befr g cached MỉCcesdu y Afr r caching has mphrrtflrtled lw l delate th l.ibe In the Load event of the form specify the following line of code to show the current time in the lblRefreshTime label. lblRefreshTime.Text DateTime.Now.ToShortTimeString After you add the label you need to add the @ OutputCache directive to the Article.aspx form. 1. Click on the HTML tab to switch to the HTML view of the Article.aspx form. 2. Add the @ OutputCache directive as shown here. The Article.aspx form will be cached for two minutes. If the same article is loaded before the two minutes has elapsed the time displayed in the lblRefreshTime label will .