This walkthrough shows you how to perform binding to data using ISDataSource.
During this walkthrough, you will learn how to do the following:
- Use ISDataSource control.
- Configure Data Source.
In order to complete this walkthrough, you will need the following:
- DataSet Component in App_Code.
- Visual Studio 2005/2008/2010 Application.
To bind data using ISDataSource
- Drag ISDataSource control from toolbox to the WebForm.
- Configure Data Source for the newly created ISDataSource.
- Select DataSet for the SchemaType.
- Click Schema Name dropdown and select dsNorthWind
from the list.
- In the next dialog, click AutoGenerate button which is located
at the bottom.
- Click Finish.
- Drag GridView / DetailsView / FormView / WebGrid or others data-bound controls.
- Set the DataSourceID (Choose Data Source) to ISDataSource1.
- Set the DataMember (View Name) to Categories.
- You are all set. Run the page in browser.
ISDataSourceSettings :
<ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaName ="dsNorthwind">
<Tables>
<ISDataSource:ISDataSourceTable TableName="Customers"
OldValuesParameterFormatString ="Original_{0}"
SelectMethod = "GetData" TypeName ="dsNorthwind.CustomersTableAdapter">
</Tables>
</ISDataSource:ISDataSource>