The DataGrid control in ASP.NET 1.x is a very powerful control. However, it still requires the understanding of the life cycle of ASP.NET as well as many lines of code to create a functional data access page. Much of coding related to DataGrid control is repetitive in nature. The upcoming ASP.NET 2.0 has a new GridView control and several data source controls. Using the GridView control and one of the data source controls, it is possible to build a data access page without writing a single line of code. In this series of articles, we will develop a custom control that will drastically simplify the DataGrid programming in ASP.NET 1.x today. In the first installment of this series, we will discuss how to simplify the programming of a read-only data access page.
In this article, we will first examine a typical data access page to identity the code that we can simplify. Next, we will build a control that allows us to simplify the DataGrid programming. We will then show how to use this control and conclude this article.
Now, let us take a look of a typical data access page.