Retrieve data from data source
Sir I am creating a website. I am in confusion that I should use ado.net classes to retrieve data from SQL server database or I should use asp.net control to retrieve data from data source?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Eddie JackPosted Jul 5, 2011, 1:51 AM
Amit ChoudharyPosted Jul 5, 2011, 1:31 AM
Both are approach to show the data from database.
If you want to do basic operations like insert, update, delete etc then use asp.net controls as its just a wizard kinda thing with no backend C# code.
but if you have something to do with the data when coming and saving to database. like to do some business operations then you can use ado.net classes fetch the data, manipulate the data, show the data at UI and update as per your requirement and then save back to database.
Its up to your usability.
Thanks.