Adding Classes to the Web Project
In this sample we'll be data-binding a GridView control on a page to a set of classes in our web application project.To begin, right-click on the project and select Add->Add New Item to add a new class called "Author" to the project:

Make the new Author class public and then add some properties and constructors to it:


Choose either the "Build->Build Solution" menu item or choose "Ctrl-Shift-B" to build the project. You now have a set of classes you can use to databind against.
Building a Data-Bound ASP.NET Page
Right-click on the project and select Add->Add New Item to add a new ASP.NET Page called "DataSample.aspx" to the project:






Click here to go to the next tutorial.
by webproject.scottgu.com
No comments:
Post a Comment