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

Professional in C# and Visual Basic Part 53. 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 9 Querying with LINQ Select New With .Genre .Skip 10 .Take 10 query End Sub C protected void Page_Load object sender EventArgs e var movies GetMovies var genres GetGenres var query from m in movies join g in genres on equals select new .Skip 10 .Take 10 query When running this code you will see that the results start with the tenth record in the list and only ten records are displayed. LINQ to XML The second flavor of LINQ is called LINQ to XML or XLINQ . As the name implies LINQ to XML enables you to use the same basic LINQ syntax to query XML documents. As with the basic LINQ features the LINQ to XML features of .NET are included as an extension to the basic .NET framework and do not change any existing functionality. Also as with the core LINQ features the LINQ to XML features are contained in their own separate assembly the assembly. In this section to show how you can use LINQ to query XML we use the same basic Movie data as in the previous section but converted to XML. Listing 9-18 shows a portion of the Movie data converted to a simple XML document. The XML file containing the complete set of converted data can be found in the downloadable code for this chapter. Listing 9-18 Sample Movies XML data file xml version encoding utf-8 Movies Movie Title Shrek Title Director Andrew Adamson Director Genre 0 Genre ReleaseDate 5 16 2001 ReleaseDate RunTime 89 RunTime Movie Movie Title Fletch Title Director Michael Ritchie Director Genre 0 Genre ReleaseDate 5 31 1985 ReleaseDate 476 Chapter 9 Querying with LINQ RunTime 96 RunTime Movie Movie Title Casablanca Title Director Michael Curtiz Director Genre 1 Genre ReleaseDate 1 1 1942 ReleaseDate RunTime 102 RunTime Movie Movies To get started seeing how you can use LINQ to XML to query XML documents let s walk through some of the same basic queries we .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
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.