This walkthrough shows you how to create and bind WebCombo to AccessDataSource control.
During this walkthrough, you will learn how to do the following:
- Use AccessDataSource.
- Use SmartTag to set DataSource.
- Use Data Source Configuration Wizard to set the Database and table.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Access to the Microsoft Access Northwind database.
- Visual Studio 2005/2008/2010 Application.
Step-By-Step Instructions
To create new web application and bind WebCombo to AccessDataSource
- Launch Visual Studio.NET 2008.
- Click on File menu, then select New and click Web Site.
- Select ASP.NET Web Site in the Template box and set Location to HTTP.
- Named the Web Site and click OK.
- Right-click on Project's name and select Add New Item.
- Select Intersoft AppForm in the My Templates box and named it as Walkthrough.aspx.
- In the Solution Explorer, right-click on App_Data and select Add Existing Item.
- Browse and add NorthWind.mdb in C:\Program Files\Intersoft Solutions\Data (Default installation folder).
- Drag WebCombo instance from ToolBar to WebForm.
- Click the SmartTag on the upper right of the WebCombo.
- Set the DataTextField and DataValueField for WebCombo.
- In Choose Data Source field, choose <New data source...>
- In Data Source Configuration Wizard, choose AccessDatabase and click OK.
- Select the connection string in App_Data and click OK.
- Select the table that you want to use, click Next and Finish afterwards.
- Run the project and the combo will look like following.
Tasks
Walkthrough: Binding WebCombo to ObjectDataSource control
Walkthrough: Binding WebCombo to ISDataSource control
Walkthrough: Binding WebCombo to SqlDataSource control
How-to: Refresh WebCombo
FAQ: I am not familiar with DataSource control concept and I have been pretty much familiar with DataSource object binding that you introduced in pre-2007 products. Why do you introduce this new data binding concept?
FAQ: How can I learn more and where can I get more resources related to DataSource control?
FAQ: Does WebCombo.NET version 4.0 still support older data binding mechanism (i.e. through InitializeDataSource)?
Concepts
Data Binding Wakthroughs
References
DataSource Property
WebCombo Class
DataSourceID Property
DataTextField Property
DataValueField Property