View Single Post
  #5 (permalink)  
Old March 8th, 2009, 04:38 PM
chobo2 chobo2 is offline
Friend of Wrox
 
Join Date: Sep 2007
Location: , , .
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by Lee Dumond View Post
You're welcome. Thanks button is on the right -->

The way I showed is better, because it takes advantage of the fact that SqlDataSource works with the DataView by default, and thus each DataItem can be safely cast to a DataRowView.

On the other hand, DataBinder.Eval uses reflection to determine whether the DataItem should be a DataRowView or a DbDataRecord. Reflection is a rather slow process, so it's worthwhile to avoid it if you can.
Ya I just found out the thank you button exists!
The Following User Says Thank You to chobo2 For This Useful Post:
Lee Dumond (March 8th, 2009)