ASP.NET与ADO.NET提供的数据源控件 [英] Data Source Controls Provided by ASP.NET vs ADO.NET

查看:121
本文介绍了ASP.NET与ADO.NET提供的数据源控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我将在.NET Framework 4.0中开发Web应用程序.在我所有的应用程序(过去开发的)中,我都使用ADO.NET来访问数据库.现在我想玩.NET框架提供的ObjectDataSource控件之类的控件.

我朝着正确的方向前进吗?
谁能告诉我ADO.NET与.NET Framework数据源控件之间的区别.

这些控件是否像ADO.Net控件一样灵活?使用这些控件(ObjectDataSource,SqlDataSource等)是否有任何限制,或者与ADO.NET相比,我无法对它们执行任何操作.

请给我一些建议.
Thanks

Hi All,
I am going to develop a web application in .NET framework 4.0. In all my applications (developed in the past), I used ADO.NET for accessing database. Now I want to play with controls like ObjectDataSource Control provided by .NET framework.

Am I going in a right direction?
Can anyone tell me the difference between ADO.NET vs .NET framework datasource controls.

Are these controls as flexible as ADO.Net controls are? Is there any limitation of using these controls (ObjectDataSource,SqlDataSource etc)or is there any action that I can not perform with them in comparison with ADO.NET.

Please give me some suggestion.
thanks

推荐答案

将ObjectDataSource与"Business"对象一起使用可让您实现细粒度的控制和SoC.通常在后台使用SqlCommand和朋友.

这是一个很好的方法,已经在现实世界中得到了广泛的使用.

问候
Espen Harlinn
Using ObjectDataSource with "Business" objects allows you finegrained control and SoC. Usually using SqlCommand and friends behind the scene.

It''s a good approach, that has seen ample realworld usage.

Regards
Espen Harlinn


SqlDataSource在后台使用ADO.Net.如果您看一下提供的属性,这些属性与您自己编写ADO.Net代码的用法相同.
SqlDataSource uses ADO.Net in the background. If you would take a look at the properties offered, they are same as what you would use while writing the ADO.Net peice of code yourself.


这篇关于ASP.NET与ADO.NET提供的数据源控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆