In this chapter, you will learn how to:
Connect to a database using ADO.NET.
Use ASP.NET data-bound controls to display and edit data.
Use the DataGrid, DataList, and Repeater controls.
In the previous two chapters, you learned about creating Web Forms and taking advantage of ASP.NET server controls in your Web Forms applications. With that overview of these two important technologies under your belt, let’s look at data access. The ability to store and access data is central to most Web applications, and this is an area that classic ASP made very simple for developers through the ActiveX Data Objects (ADO) COM components. The Microsoft .NET platform provides a set of classes called ADO.NET that is the logical successor to ADO, although the underlying object model has undergone significant changes. ASP.NET, meanwhile, exposes a set of data-bound controls (which I touched on briefly in Chapter 8) that integrate seamlessly with ADO.NET to provide data-binding services.
Important |
ADO.NET is a large enough topic to merit a book of its own, so at best this chapter will provide an overview. I strongly encourage you to use the available resources, such as the ASP.NET and HowTo QuickStart tutorials (installed with the Microsoft .NET Framework SDK samples), which have numerous ADO.NET examples. Other resources include the .NET Framework SDK and Microsoft Visual Studio .NET documentation, and of course other books, such as ADO.NET Step by Step by Rebecca M. Riordan (Microsoft Press, 2002), and Building Web Solutions with ASP.NET and ADO.NET (Microsoft Press, 2002) by Dino Esposito, a noted expert on ADO and ADO.NET. |