ADO.NET 101: SqlDataReader, Part 2
(Page 1 of 5 )
In the first part of our SqlDataReader tutorial, you saw how to work with it using code. In this second part, you will learn how to work with it using the graphic user interface.
In Part 1, working with the SqlDataReader was described entirely based on code. The connection to the SQL Server, the configuring of the SQLCommand object -- whether it was for executing SQL statements, or stored procedures, were all accomplished by code. Further, the data was displayed to the user on the browser using mostly the Write() method of the Request object.
In this tutorial, working with SQLDataReader will be described mostly by using the Graphic User Interface. Resorting to GUI is helpful in prototyping, and invaluable in understanding how the code is generated in the design phase. A step-by-step approach is used and the tutorial is self-contained, and any referencing links are sparingly used to reduce distraction.
The tutorial follows the same pattern as Part 1.
In many forums, the frequently asked questions often center around the display of data retrieved from the database. The data retrieved from the database can be displayed by a variety of methods:
- Using Response.Write() method as seen in Part 1
- Populating a dynamically created HTML Table
- Using Standard Server Controls
- Textbox
- ListBox
- Drop Down List
- Table
- Using Databound Controls
In this tutorial several methods of displaying the data will be described. Using Databound controls as well as using data repeater control will be described in a separate tutorial.
Next: Configuring the Connection to the Database >>
More Database Articles
More By Jayaram Krishnaswamy