简体   繁体   中英

ASP.NET Data source controls

I am learning ASP.NET. I noticed there are several types of ASP.NET data source controls available in Microsoft Visual studio, including SqlDataSource, AccessDataSource, ObjectDataSource, and XmlDataSource. Does anyone could explain the differences among SqlDataSource, AccessDataSource, ObjectDataSource, and XmlDataSource? Which one is more useful in the real world? Thank you.

go through this links, it helped me. Hope it will help you too.

Data Source Controls and Connections
ASP.NET Data Sources

I used sqldatasources a little, but now, just use entity framework. I was (still am) getting data from a sql db.

mrqyue, You can try this

This will explain more clearly about what you are looking for..

Moreover, try this . It will explain with examples

You choose XMLDataSource if you connect to an XML file. You choose AccessDataSource if your source of data is from Access database. You choose SqlDataSource if you connect to any data source that has an ADO.NET data provider (SQL Server, Oracle, OLEDB, ODBC). You choose ObjectDataSource if you want to connect to a custom object to fetch/take data from the database (a very efficient way for a medium-to-large application).

Most of my projects are using N-Tier architecture and my best option is always ObjectDataSource. It gives my team a freedom to work independently, but simultaneously in one big project!

I hope it helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM