Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 3.5 in C# and Visual Basic Part 45

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Professional ASP.NET 3.5 in C# and Visual Basic Part 45. Building on the revolutionary ASP.NET 2.0 release, ASP.NET 3.5 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 ASP.NET 2.0 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 8 Data Managementwith ADO.NET XML file. It didn t even allow you to serialize the DataTable object independently of the larger and encompassing DataSet object. This limitation required you to always use the DataSet object to perform any operation on a DataTable. The current version of ADO.NET removes this limitation and enables you to work directly with the DataTable for all your needs. In fact we recommend that you don t use the DataSet object unless you need to work with multiple DataTable objects and need a container object to manage them. If you end up working with only a single table of information then it is best to work with an instance of the DataTable object rather than a DataSet that contains only a single DataTable. The current version of ADO.NET provides the capability to load a DataTable in memory by consuming a data source using a DataReader. In the past you were sometimes restricted to creating multiple overloads of the same method just to work with both the DataReader and the DataTable objects. Now you have the flexibility to write the data access code one time and reuse the DataReader either directly or to fill a DataTable as shown in Listing 8-11. Listing 8-11 How to load a DataTable from a DataReader VB @ Page Language VB @ Import Namespace System.Data @ Import Namespace System.Data.SqlClient @ Import Namespace System.Configuration script runat server Protected Sub Page_Load ByVal sender As Object _ ByVal e As System.EventArgs If Not Page.IsPostBack Then Dim MyDataTable As DataTable Dim MyReader As SqlDataReader Dim CityParam As SqlParameter Dim MyConnection As SqlConnection New SqlConnection MyConnection.ConnectionString _ ConfigurationManager.ConnectionStrings DSN_Northwind .ConnectionString Dim MyCommand As SqlCommand New SqlCommand MyCommand.CommandText _ SELECT FROM CUSTOMERS WHERE CITY @CITY MyCommand.CommandType CommandType.Text MyCommand.Connection MyConnection CityParam New SqlParameter CityParam.ParameterName @CITY .

TÀI LIỆU LIÊN QUAN
Đã 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.