This is probably going to boil down to a philosophical question more than anything, but is there really any major difference between using the <asp:sqldatasource>
in the aspx file versus doing all of the work in the code behind?
If so what are they and why? I know I have my preferences, but I am just curious what others think.
Edit:
I purposely didn't put my preference in which is to put as much as possible in the code behind or even DAO. I was curious what others thought since I am going to have to update a bunch of code that has sqldatasource calls all over of the apsx files.
Thank you everyone who responded. I appreciate your input.
Embedding your SQLDataSource within the asp.net page is coupling your presentation layer with your data access layer resulting in reduced testability and flexibility. I strongly suggest moving your data connections to their own classes and created a data access layer that your code behind pages could then draw from.
Ideally you'd seperate this even further into an N-Tier solution. Link