DataSources in .net 2.0
It is damn ez in asp.net 2.0 to access data, thanks to the DataSource controls. There are the AccessDataSource for access databases, SqlDataSource for ANY OLE-DB compliant database, XmlDataSource for accessing XML data, and ObjectDataSource for biz objects (more on this later).
Any newbie can now juz drag a DataSource control from the toolbox and follow the wizard steps, and then choose the data-bound control and select this DataSource, and wham~ it is bound. no events, codes or anything to be written manually. All the settings are in the aspx, written by VS2005, including Select, Update, Delete and Insert statements. Even caching is supported intrinsicly by juz setting EnableCaching="true" in the datasource (SqlDataSource). damn.
But for more advanced apps which require n-tier, this might not be a best practice, especially the part where SQL is embedded directly in aspx. Well, the ObjectDataSource control is there for this purpose, which binds to biz objects. ObjectDataSource is in a later chapter, so after i go thru it, i will post my comments here :)
Any newbie can now juz drag a DataSource control from the toolbox and follow the wizard steps, and then choose the data-bound control and select this DataSource, and wham~ it is bound. no events, codes or anything to be written manually. All the settings are in the aspx, written by VS2005, including Select, Update, Delete and Insert statements. Even caching is supported intrinsicly by juz setting EnableCaching="true" in the datasource (SqlDataSource). damn.
But for more advanced apps which require n-tier, this might not be a best practice, especially the part where SQL is embedded directly in aspx. Well, the ObjectDataSource control is there for this purpose, which binds to biz objects. ObjectDataSource is in a later chapter, so after i go thru it, i will post my comments here :)
