Last post Jun 19, 2019 06:25 AM by AddWeb Solution
Jun 18, 2019 09:53 PM|dcofomaha|LINK
Since I need to support a new webform application, I have a question about how a datasource is connected to the gridview control.
When I look at the following code:
<asp:ObjectDataSource runat="server" ID="DataSourceItems"
I see TypeName="Items". What does the typename value mean? Is that the name of the database table?
Jun 19, 2019 02:02 AM|Yongqing Yu|LINK
According to your description, the TypeName is a partially or fully qualified class name that identifies the type of the object that the ObjectDataSource represents.
For more detailed explanation, you could refer to this link, it contains a case of GridView binding ObjectDataSource:
You could alse take a look at the difference between sqldatasource and ObjectDataSource :
Jun 19, 2019 06:25 AM|AddWeb Solution|LINK
The 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 i.e. ObjectDataSource control identifies appropriate class name of business object using its TypeName
property and a business object method that is called to retrieve data with its SelectMethod property.Basically, you wire methods at business layer with operations at presentation layer. This way you can have absolute strict control over the flow of
You can use the ObjectDataSource control with a LINQ to SQL class. To do so, you set the TypeName property
to the name of the data-context class.
For more details kindly refer the following link