Professional ASP.NET 1.1 [Electronic resources]

Alex Homeret

نسخه متنی -صفحه : 244/ 202
نمايش فراداده

Use Data Binding Where Possible

Traditionally, ASP has been used to iterate through a rowset, extracting values and placing them in the page. In ASP.NET, the list controls can do this automatically through data binding, and provide a huge performance increase.

Compared to using ASP 3.0 with ADO to create an HTML table explicitly from a

Recordset , ASP.NET with a data-bound

DataList control fed by a

DataReader object using the

OleDb data provider can be three times quicker. Switch to the

Sql TDS data provider and it can be up to five times faster than the ASP 3.0 approach.

If you do need to bind to a

DataSet , use the

DataMember property of the control to specify the table rather than creating a

DataView object first.