There are several ways to do it, each with its pros and cons:
1) SQLDataSource - not recommended because the SQL statement is embedded in the .aspx page and any changes would require us to update the web page itself.
2) ObjectDataSource - there are two ways of using this:
a) Table Adapter - (good) separate SQL statement from the page design.
b) Custom Data Layer - (best) each table expressed as class, column fields as class properties
3) Manual binding - code to open/close connection and bind the SQL query
4) LINQ - useful when your application is small, but uses new form of SQL language (not Transact-SQL)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment