Typed datasource controls
Data source controls are the excellent tools on the asp.net to bind data to any data binding controls like gridivew, repeater, datalist, etc to display data on web pages.
ASP.NET includes data source controls that allow you to work with different types of data sources such as a database, an XML file, or a middle-tier business object.
Here i am taking abut ObjectDataSource control.
ObjectDataSource control represents a middle-tier business object in a multi-tier application. It acts as a data interface for data bound controls such as GridView controls. It enables data bound controls to perform database tasks like retrieval, editing and updating using intermediate middle-tier business object. It provides a structured way for you to bind data bound controls on page to middle-tier business object. You can declaratively bind data bound controls to business objects without writing single piece of code using ObjectDataSource control.
ObjectDataSource control uses Reflection to expose and call the appropriate methods of a business object to select, insert and update data. You can use Typename property of ObjectDataSource control identifies the class with which ObjectDataSource control works. Basically, you wire methods at business layer with operations at presentation layer. This way you can have absolute strict control over the flow of the program.
Stronged Typed DataSource Controls
Stronged typed datasource controls are the datasource controls whose methods has been defined. You can find the method by intellisense.
If not supported methods are supplied throws compile time error messages. So are early binding rather than late binding as in the case of normal objectdatasource control.
When you select the SelectMethod Attribute, you will see via intellisense a list of all available methods from your domain. How cool is that!
The wonderful part of the Typed DataSource control is that you don’t have to do anything when you want to edit/insert/delete an object. You simply have the grid call the Edit/Delete/Insert command, which can be done a variety of ways in ASP.net 2.0.






