Grid is often used in the development of. net 2.0 web applications to display data in the database. The following technologies are available:
1. ADO. Net
2. ASP: SqlDataSource
3. Microsoft Enterprise Library 2.0 -- Data Access Componet.
Using ADO.net and Microsoft Enterprise Library Data Access Componet requires a lot of code development work.
ADO.net has more code than Microsoft Enterprise Library Data Access Componet.
ASP: SqlDataSource can be quickly developed using the designer. ASP: SqlDataSource supports Grid display by page. The column sorting function does not require additional code. Therefore, it is very suitable for web development that is simple and business logic is not complex. However, ASP: SqlDataSource can only be developed on the webpage. In addition, if the same code is used between webpages, they can only be copied to each webpage. Therefore, a large amount of use will increase the cost of later maintenance. The use of ASP: SqlDataSource destroys the multi-layer software architecture.
With ADO.net, Microsoft Enterprise Library Data Access Componet can implement a multi-layer software architecture. This makes the development of the presentation layer independent of the structure of the data layer. Therefore, it is more suitable for complicated business logic. Microsoft Enterprise Library has tools to support database connection configuration. Therefore, for a project, you can consider using Microsoft Enterprise Library.