TAILIEUCHUNG - Professional ASP.NET 3.5 in C# and Visual Basic Part 7

Professional in C# and Visual Basic Part 7. Building on the revolutionary release, 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 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 1 Application and Page Frameworks Listing 1-5 A code-behind page VB Partial Class _Default Inherits Protected Sub Button1_Click ByVal sender As Object _ ByVal e As Handles Hello End Sub End Class C using System using using using using using using using using using using public partial class _Default protected void Button1_Click object sender EventArgs e Hello The .aspx page using this code-behind model has some attributes in the Page directive that you should pay attention to when working in this mode. The first is the CodeFile attribute. This is an attribute in the Page directive and is meant to point to the code-behind page that is used with this presentation page. In this case the value assigned is or . The second attribute needed is the Inherits attribute. This attribute was available in previous versions of but was little used before . This attribute specifies the name of the class that is bound to the page when the page is compiled. The directives are simple enough in . Look at the code-behind page from Listing 1-5. The code-behind page is rather simple in appearance because of the partial class capabilities that .NET provides. You can see that the class created in the code-behind file uses partial classes employing the Partial keyword in Visual Basic 2008 and the partial keyword from C 2008. This enables you to simply place the methods that you need in your page class. In this case you have a button-click event and nothing else. Later in this chapter we look at the compilation process for both of these models. 12 Chapter 1 Application and Page Frameworks

TỪ KHÓA 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.