Your full service technology partner! 
-Collapse +Expand
Search Industry Group:

-Collapse +Expand Industry Store

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► KBIT Water-Coo...   Print This     
Industry IT Water-Cooler for Power-Users:
ASP.NET and SQL Server: Chapter 1: Displaying A Gridview of SQL Server Data
Posted 11 years ago on 6/15/2010
Take Away:

This is a quick topic to get you started presenting data in a grid in an ASP.NET web page.

 A blog topic from Bryan.V's Blog


Chapter 1.
Assuming you already have data you wish to display in your SQL Server database, create an aspx ajax web form.

Now open the Database Explorer, and open your database, then navigate to the table you want to show in the web form.  Click the table, and drag it to your form div tags.

Hit control-s (save) and your datagrid will appear in the design view window along with a SqlDatasource.

That was easy!  As a bonus, there are some handy easy-formatting options.  Click the grid in the design view, and look for the little pop-out menu at the top right of the control.  Select AutoFormat.

The Auto Format options can configure all the visual settings for you in a flash.  This menu is also used to select editing, paging, sorting options for the gridview.

Press F5 to view the grid in action.  Then stay tuned for Chapter 2: How to use a dropdown list in the grid.

Blog Entries!

 Contribute to this open topic blog!
Comment on this blog topic...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1156A1
Enter key:
Blog Contributed By Bryan Valencia:

Bryan Valencia is the author of millions of lines of code and writes for PrestwoodBoards and Visual Studio Journey on-line magazines.

Visit Profile

 KB Article #102165 Counter
Since 6/15/2010
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2021 Prestwood IT Solutions.   [Security & Privacy]