# Binding to a Data Source

This tutorial will show how to bind **RadTabStrip** to an **AccessDataSource**:

1. Locate the file "BlogPosts.mdb" file that appears in the **Live Demos/App_Data** folder of your **RadControls for ASP.NET Ajax** installation. Drag this file to the **App_Data** folder in the Solution Explorer for your project:

   ![Add Database](https://www.telerik.com/products/aspnet-ajax/documentation/assets/eabe8546a7841ffbcf8117f36bdaddc8/tabstrip_adddatabase.png)

2. Drag a **RadTabStrip** component from the toolbox onto your Web page. The **RadTabStrip** [Smart Tag](https://www.telerik.com/products/aspnet-ajax/documentation/controls/tabstrip/design-time/smart-tag) should appear automatically:

   ![Smart Tag](https://www.telerik.com/products/aspnet-ajax/documentation/assets/fe192ee5635f3aa87727fc3da080f4ef/tabstrip_smarttag.png)

3. In the **RadTabStrip** Smart Tag, use the **Skin** drop-down to change the [skin](https://www.telerik.com/products/aspnet-ajax/documentation/controls/tabstrip/appearance-and-styling/skins) for the **RadTabStrip** to "Outlook":

   ![Choose Skin](https://www.telerik.com/products/aspnet-ajax/documentation/assets/149bbb67f19485e1d50868d020dc29ee/tabstrip_chooseskin.png)

4. Still in the Smart Tag, open the **Choose Data Source** drop-down and select **New Data Source**.

   ![New DataSource](https://www.telerik.com/products/aspnet-ajax/documentation/assets/6ef6331e86995d9cae20943f399548be/tabstrip_newdatasource.png)

5. The Data Source Configuration Wizard appears. In the Select a DataSource Type screen, specify an **AccessDataSource** and click **OK.**

   ![Choose DataSource type](https://www.telerik.com/products/aspnet-ajax/documentation/assets/7c180d17287cbeda6eea4c092fc22b5a/tabstrip_chooseadatasourcetype.png)

6. In the **Choose a Database** screen, click the **Browse** button, and select the "BlogPosts.mdb" file. Then choose **Next** to continue:

   ![Choose a database](https://www.telerik.com/products/aspnet-ajax/documentation/assets/4d3fd28f67e34b5c43c7de99fada7b6a/tabstrip_chooseadatabase.png)

7. In the **Configure the Select Statement** screen, choose **Specify columns from a table or view**, and select the "Author" and "Title" fields. Then choose **Next** to continue:

   ![Configure Select](https://www.telerik.com/products/aspnet-ajax/documentation/assets/53f80b1552c7fc1f79313805907063c1/tabstrip_configureselect.png)

8. Click the Test Query button to see the data from the data source. Then choose Finish to exit the Wizard:

   ![Test Query](https://www.telerik.com/products/aspnet-ajax/documentation/assets/73e27dcd4819133dcce1a5c43389ec78/tabstrip_testquery.png)

9. In the Properties pane for the **RadTabStrip** component:

10. Set the **DataTextField** property to "Author".

11. Set the **DataValueField** property to "Title".

    ![Data text and value fields](https://www.telerik.com/products/aspnet-ajax/documentation/assets/2b5e91290e86571286cfc67d22896f7a/tabstrip_datatextandvaluefields.png)

12. Drag a **TextBox** control from the toolbox onto your Web page below the **RadTabStrip** control:

* Set the **BorderWidth** property to "0px".

* Set the **Width** property to "100%".

1. Add the following **TabClick** event handler to your **RadTabStrip** control so that the text box shows the value of a tab item when the user selects it:

```C#
protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
{
 TextBox1.Text = e.Tab.Value;
} 				
```

```VB.NET
Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, _
        ByVal e As Telerik.Web.UI.RadTabStripEventArgs) _
        Handles RadTabStrip1.TabClick
  TextBox1.Text = e.Tab.Value
End Sub  	
```

1. Run the application. Note that the tabs are labelled using the "Author" field of the data source. Click on a tab. Note that the text box displays the value of the "Title" field:

   ![Bound TabStrip](https://www.telerik.com/products/aspnet-ajax/documentation/assets/860213a830ac6b29ac5ee3f480888e08/tabstrip_boundtabstrip.png)

## See Also

* [Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/tabstrip/data-binding/overview)

* [Getting Started](https://www.telerik.com/products/aspnet-ajax/documentation/controls/tabstrip/getting-started/getting-started)
