Part I: Introduction to Active Server Pages Chapter 1—Active Server Pages: An Introduction Chapter 2—Active Server Pages: Server-Side Scripting Chapter 3—Extending Active Server Pages Part II: Object Reference Chapter 4—Application Object Chapter 5—ObjectContext Object Chapter 6—Request Object Chapter 7—Response Object Chapter 8—Server Object Chapter 9—Session Object Chapter 10—Preprocessing Directives, Server-Side Includes
[ Team LiB ] Recipe 1.5 Connecting to an Access Databasefrom ASP.NET Problem You know your connection string is correct, but still can't connect to your Microsoft Access database from your ASP.NET application. What are the differences between connecting from a Windows Forms
[ Team LiB ] Recipe 9.3 Caching Data Problem Given a Web Forms application that is performing poorly because it is repeatedly reading data that doesn't change very often, you need to cache the data to eliminate unnecessary queries and improve the performance. Solution Use the ASP.NET Cache class.
ất cả các dự án mẫu, trong các định dạng cả tiền của họ tập thể dục và postexercise, có sẵn để tải về từ trang danh mục của cuốn sách trên trang web cho đối tác xuất bản của Microsoft, O'Reilly Media: http://oreilly.com/catalog/0790145300034/ Click các ví dụ liên kết trên trang đó. Khi một danh sách các file sẽ xuất hiện, tìm và tải về ADO.NET 4 SBS Examples.zip file. Lưu ý Ngoài các mẫu mã, hệ thống của bạn phải có Visual Studio...
[ Team LiB ] Recipe 7.7 Displaying an Image from a Database in a Web Forms Control Problem You need to display an image from a database column in an ASP.NET control. Solution Fill an ASP.NET Image control from a database field by pointing the ImageUrl property
[ Team LiB ] Recipe 7.2 Binding Complex Data to Web Forms Controls Problem You want to bind multiple columns in multiple records to an ASP.NET control. Solution Set the control's advanced properties (see Table 7-1) before calling DataBind( ).
Accessing Deleted Rows in a DataTable Problem When you delete rows from a DataSet they are really marked for deletion until changes are committed by calling AcceptChanges( ) either directly or indirectly.
[ Team LiB ] Recipe 2.2 Building a DataSet Programmatically Problem You want to build a DataSet programmatically—including adding tables, columns, primary keys, and relations—from a schema that you have designed.
[ Team LiB ] Recipe 3.10 Selecting the Top n Rows in a DataTable Problem You want to create a grid that shows the t op five rows in a DataTable, based on the values in one of the columns. Solution Use an appropriate sort order with a DataView filter.
[ Team LiB ] Recipe 3.9 Finding Rows in a DataView Problem You need to find a row or group of rows in a DataView meeting certain criteria. Solution Use a sorted DataView to find rows using columns that are not part of the primary key. The sample code contains two event handlers: Form.Load Sets up the sample by creating a DataTable containing the Orders table from the Northwind database. A DataView of the table sorted by the CustomerID and EmployeeID is created. Find Button.Click Uses the FindRows( ) method of the DataView to retrieve the array of DataRowView objects...
[ Team LiB ] Recipe 3.12 Filtering for Null Values Problem You want to filter a DataView for rows that have null values. Solutions Use the IS NULL clause with the RowFilters property of the DataView. The sample code contains two event handlers
[ Team LiB ] Recipe 1.18 Changing the Database for an Open Connection Problem You want to change the database that a connection uses without recreating the connection. Solution Use the ChangeDatabase( ) method to change the database for a connection.