O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying Your Data

Everything you've done so far is invisible at runtime. You've set up a DataAdapter object, a Connection object, and a DataSet object, but you can't see any of these things. In order to actually see the data you're working with, you'll need to add controls to the page. ASP.NET makes this simple.

Adding the Grid

Now that you've set up all the data-handling components, it's time to add the DataGrid control to the page and hook it up. Follow these steps to display the data retrieved by the DataAdapter in a grid:

1.
In the Solution Explorer window, select Products.aspx and select View, Designer (or simply double-click) to view the page in the designer.
2.
From the Web Forms tag of the Toolbox window, drag a DataGrid control ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required