Data to Web in Five Minutes with Visual Web Developer 2005, Page 2
VWD offers you quite a bit of flexibility in both getting the data to the Web page and in the way that you display it. On the presentation side, the Data tab of the toolbox includes five different controls:
- GridView, which you've already see (this control replaces the DataGrid from earlier versions of Visual Studio .NET).
- DataList, which drops all of the records on the page in one long list.
- DetailsView, which provides a tabular, pageable view of the data.
- FormView, shown in Figure 3, which also gives you a view oriented towards one record at a time.
- Repeater, which lets you create your own templates to display the data any way that you'd like.
The toolbox also contains multiple controls to let you grab different types of data and make them available to Web pages:
- SqlDataSource, for SQL Server data.
- AccessDataSource, for Microsoft Access data.
- ObjectDataSource, which can use a business object as the source of data.
- DataSetDataSource, for data that's already been pulled into a DataSet.
- XmlDataSource, for data in XML files.
- SiteMapDataSource, which is specialized for building navigation controls.
Meanwhile, this first beta is pretty darned amazing. Remember, though, that it is beta software. Don't put it on a machine that you can't afford to seriously damage, and don't try to use it for anything that you plan to actually release. Testing with VMware or Virtual PC is the ideal way to go if you don't have a spare computer hanging around for the testing. Have fun!
Mike Gunderloy is the author of over 20 books and numerous articles on development topics, and the lead developer for Larkware. Check out his latest book, Coder to Developer from Sybex. When he's not writing code, Mike putters in the garden on his farm in eastern Washington state.
Page 2 of 2