Microsoft ASP.NET Programming with Microsoft Visual Basic .NET Version 2003 Step by Step [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Microsoft ASP.NET Programming with Microsoft Visual Basic .NET Version 2003 Step by Step [Electronic resources] - نسخه متنی

G. Andrew Duthie

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Chapter 9 Quick Reference








































To


Do this


Connect to a SQL Serverdatabase


Create and open an instance of the SqlConnection class from the System.Data.SqlClient namespace.


Connect to an OLE DBdatasource


Create and open an instance of the OleDbConnection class from the System.Data.OleDb namespace.


Execute SELECT, UPDATE, INSERT, or DELETE statements against a database


Create an instance of the SqlCommand or OleDbCommand class, define a query, and call one of its Executemethods.


Use an in-memory cache of hierarchical data


Create an instance of the DataSet class from the System.Data namespace. Populate the dataset by calling the Fill method of the SqlDataAdapter or OleDbDataAdapter class.


Display read-only data in a bound control


Bind the control to a SqlDataReader or an OleDbDataReader. Be sure to pass the CommandBehavior.CloseConnection argument to the ExecuteReader method when creating the datareader. This ensures that the underlying connection is closed when the datareader is closed.


Bind data to a control


Set the DataSource property of the control to the DataReader, DataView, or other data source, and then call the DataBind method of the control (or call the page’s DataBind method).


Edit bound data in a DataGrid


Add an Edit, Update, Cancel button column using the Property Builder, and add event handlers for Edit, Update and Cancel in code.


Delete bound data in a DataGrid


Add a Delete button column using the Property Builder, and add a Delete event handler in code.


Display bound data in multiple columns


Use a DataList control and set the RepeatColumns attribute to the number of columns desired.


Display bound data with the greatest possible flexibility


Use a Repeater control, and manually add HTML code, along with data-binding directives.


/ 126