Data Binding on the Web with ASP.NET

To see how easy it can be to bind an ASP.NET form to data, create a new ASP.NET Web Application project, and then create a typed DataSet named AW2008.xsd, add the AdventureWorks2008 Currency table to it, and build the project. (This is necessary in ASP.NET projects to make the DataSet and TableAdapter classes available to the designers.) Now open the project’s Default.aspx form in Design view and perform the following steps:

  1. From the Data tab of the Toolbox, add an ObjectDataSource control to the form. Set its (ID) property to odsAW2008.

  2. Click the control’s SmartTag (the arrow in the upper-right corner), and then select the Configure Data Source option from its ObjectDataSource Tasks menu.

  3. On the Choose A Business ...

Get Programming Microsoft® SQL Server™ 2008 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.