Intersoft Support Center

Bind to SQL DataSource Control

This walkthrough shows you how to create and bind WebCombo to SQLDataSource control.

During this walkthrough, you will learn how to do the following:

  • Use SQLDataSource.
  • 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 SQL Northwind database.
  • Visual Studio 2005/2008/2010 Application.

 Step-By-Step Instructions

To create new web application and bind WebCombo to SQLDataSource

  1. Launch Visual Studio.NET 2008.
  2. Click on File menu, then select New and click Web Site.
  3. Select ASP.NET Web Site in the Template box and set Location to HTTP.
  4. Named the Web Site and click OK.
  5. Right-click on Project's name and select Add New Item.
  6. Select Intersoft AppForm in the My Templates box and named it as Walkthrough.aspx.
  7. In the Solution Explorer, right-click on App_Data and select Add Existing Item.
  8. Browse and add NorthWind.mdb in C:\Program Files\Intersoft Solutions\Data (Default installation folder).
  9. Drag WebCombo instance from ToolBar to WebForm.
  10. Click the SmartTag on the upper right of the WebCombo.
  11. Set the DataTextField and DataValueField for WebCombo.
  12. In Choose Data Source field, choose <New data source...>.



  13. In Data Source Configuration Wizard, choose Database and click OK.



  14. Select the ConnectionString and click Next.



  15. Select the table that you want to use and click Next.



  16. Click Finish and run the project.



  17. The combo will look like following.



Previous Next