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

Professional in C# and Visual Basic Part 4. 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. . | Introduction head head body form runat server asp DataGrid id DataGrid1 runat server AllowPaging True OnPageIndexChanged DataGrid1_PageIndexChanged asp DataGrid form body html Although quite a bit of code is used here this is a dramatic improvement over the amount of code required to accomplish this task using classic Active Server Pages . We will not go into the details of this older code we just want to demonstrate that in order to add any additional common functionality such as paging for the data shown in a table the developer had to create custom code. This is one area where the developer productivity gains are most evident. provides a control called the GridView server control. This control is much like the DataGrid server control but the GridView server control besides offering many other additional features contains the built-in capability to apply paging sorting and editing of data with relatively little work on your part. Listing I-2 shows you an example of the GridView server control. This example builds a table of data from the Customers table in the Northwind database that includes paging. Listing I-2 Viewing a paged dataset with the new GridView server control @ Page Language VB script runat server script html xmlns http 1999 xhtml head runat server title GridView Demo title head body form runat server asp GridView ID GridView1 Runat server AllowPaging True DataSourceId Sqldatasource1 asp SqlDataSource ID SqlDataSource1 Runat server SelectCommand Select From Customers ProviderName ConnectionString Provider SQLOLEDB Server localhost uid sa pwd password database Northwind form body html That s it You can apply paging by using a couple of new server controls. You turn on this capability using a server control attribute the AllowPaging attribute of the GridView control asp GridView ID GridView1 Runat server AllowPaging True DataSourceId SqlDataSource1 xxxiv Introduction The other interesting event occurs in 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.