Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 3.5 in C# and Visual Basic Part 125

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Professional ASP.NET 3.5 in C# and Visual Basic Part 125. Building on the revolutionary ASP.NET 2.0 release, ASP.NET 3.5 adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in ASP.NET 2.0 now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 26 User and Server Controls If c1.GetType Is GetType WebUserControl Then This control is not participating in Outputcache CType c1 WebUserControl .ID myWebUserControll CType c1 WebUserControl .Text My users controls text Elself c1.GetType Is GetType PartialCachingControl And _ CType c1 PartialCachingControl .CachedControl IsNot Nothing Then The control is participating in output cache but has expired Dim myWebUserControl as WebUserControl _ CType CType c1 PartialCachingControl .CachedControl _ WebUserControl myWebUserControl.ID myWebUserControl1 myWebUserControl.Text My users controls text End If End Sub script C script runat server void Page_Load object sender EventArgs e Control myForm Page.FindControl Form1 Control cl LoadControl WebUserControl.ascx myForm.Controls.Add c1 if c1 is WebUserControl This control is not participating in OutputCache WebUserControl c1 .ID myWebUserControl1 WebUserControl c1 .Text My users controls text else if c1 is PartialCachingControl PartialCachingControl c1 .CachedControl null The control is participating in output cache but has expired WebUserControl myWebUserControl WebUserControl PartialCachingControl c1 .CachedControl myWebUserControl.ID myWebUserControl1 myWebUserControl.Text My users controls text script The sample demonstrates how you can test to see what type the LoadControl returns and set properties based on the type. For more information on caching check out Chapter 23. Finally in all the previous samples that demonstrate dynamically adding user controls the user controls have been added during the Page_Load event. But there may be times when you want to add the control based on other events such as a button s Click event or the SelectedIndexChanged event of a DropDownList control. Using these events to add user controls dynamically presents challenges. Specifically because the events may not be raised each time a page postback occurs you need to create a way to track when a user control has been added so that .

TÀI LIỆU LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.