SqlDataSource: The bad and the ugly.

Note: If you are not an asp.net developer, this post may not make much sense.
When I was a newbie in asp.net, I actually used sqldatasource control on all my web pages. It didn't take much long for me though, to realize the problems with sqldatasource, which should be obvious to developers with any amount of experience. Sqldatasource control tightly couples the presentation layer with the data access layer. With any changes to your database, you may have to make changes in a number of places. I was like, "what were the Microsoft people thinking, when they created sqldatasource ?".
Anyway, here is a best practice for newbies.

Don't use SqlDataSource. Just don't.

No comments: