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

Professional in C# and Visual Basic Part 29. 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 5 Working with Master Pages Start by reviewing the code for the master page. The first line is the directive @ Master Language VB Instead of using the Page directive as you would with a typical .aspx page you use the Master directive for a master page. This master page uses only a single attribute Language. The Language attribute s value here is VB but of course you can also use C if you are building a C master page. You code the rest of the master page just as you would any other .aspx page. You can use server controls raw HTML and text images events or anything else you normally would use for any .aspx page. This means that your master page can have a Page_Load event as well or any other event that you deem appropriate. In the code shown in Listing 5-1 notice the use of a new server control the asp ContentPlaceHolder control. This control defines the areas of the template where the content page can place its content tr td asp ContentPlaceHolder ID ContentPlaceHolder1 runat server asp ContentPlaceHolder td td asp ContentPlaceHolder ID ContentPlaceHolder2 runat server asp ContentPlaceHolder td tr In the case of this master page two defined areas exist where the content page can place content. Our master page contains a header and a footer area. It also defines two areas in the page where any inheriting content page can place its own content. Look at how a content page uses this master page. Coding a Content Page Now that you have a master page in place in your application you can use this new template for any content pages in your application. Right-click the application in the Solution Explorer and choose Add New Item to create a new content page within your application. To create a content page or a page that uses this master page as its template you select a typical Web Form from the list of options in the Add New Item dialog see Figure 5-5 . Instead of creating a typical Web Form however you check the Select Master Page check box. This gives you the .

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.