tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 31

Professional in C# and Visual Basic Part 31. 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 Listing 5-18 illustrates how you can work with this main master from a submaster file. Listing 5-18 The submaster page Master Language VB MasterPageFile asp Content ID Content1 ContentPlaceHolderID head Runat Server asp Content asp Content ID Content2 ContentPlaceHolderId ContentPlaceHolder1 runat server asp Label ID Label1 runat server BackColor E0E0E0 BorderColor Black BorderStyle Dotted BorderWidth 2px Font-Size Large Reuters Europe asp Label br hr asp ContentPlaceHolder ID ContentPlaceHolder1 runat server asp ContentPlaceHolder asp Content Looking this page over you can see that it isn t much different than a typical .aspx page that makes use of a master page. The MasterPageFile attribute is used just the same but instead of using the Page directive the Master page directive is used. Then the Content2 control also uses the ContentPlace-Holderid attribute of the Content control. This attribute is tying this content area to the content area ContentPlaceHolderl which is defined in the main master page. One new feature of is the ability to view nested master pages directly in the Design view of Visual Studio 2008. The previous Visual Studio 2005 would actually throw an error when trying to present a nested master page. Figure 5-15 shows a nested master page in the Design view of Visual Studio 2008. Within the submaster page presented in Listing 5-18 you can also now use as many ContentPlaceHolder server controls as you want. Any content page that uses this master can use these controls. Listing 5-19 shows a content page that uses the submaster page . Listing 5-19 The content page @ Page Language VB MasterPageFile asp Content ID Content1 ContentPlaceHolderId ContentPlaceHolder1 runat server Hello World asp Content As you can see in this content page the value of the MasterPageFile attribute in the Page directive is the .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.