SPDataSourceView 类

支持SPDataSource控件并提供对SharePoint Foundation数据执行操作的数据绑定控件的一个接口。

继承层次结构

System.Object
  System.Web.UI.DataSourceView
    Microsoft.SharePoint.WebControls.SPDataSourceView

命名空间:  Microsoft.SharePoint.WebControls
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class SPDataSourceView _
    Inherits DataSourceView
用法
Dim instance As SPDataSourceView
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class SPDataSourceView : DataSourceView

备注

SPDataSourceView类实现由SPDataSource控件公开的数据功能。在运行时,为每个SPDataSource类的实例创建一个SPDataSourceView对象。

页面开发人员应仅间接访问SPDataSourceView对象,通过关联的SPDataSource对象。例如,当页代码将SPDataSource对象的SelectCommand属性设置, SPDataSource对象将传递到关联的SPDataSourceView对象的SelectCommand属性的值。相反,数据绑定控件呼叫SPDataSourceView对象的Select方法时, SPDataSourceView对象将调用其关联的SPDataSource对象,该然后引发Selecting事件对象的OnSelecting方法。页面开发人员可以通过重写OnSelecting方法来处理的事件。

数据绑定控件开发人员必须能够直接访问SPDataSourceView对象。例如,数据绑定控件中的代码可能会调用DataBoundControl.GetData()方法从关联的数据源控件,检索SPDataSourceView对象,然后调用SPDataSourceView对象来检索数据的Select方法。

线程安全性

该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。

另请参阅

引用

SPDataSourceView 成员

Microsoft.SharePoint.WebControls 命名空间