SqlDataSourceView SqlDataSourceView SqlDataSourceView SqlDataSourceView Class

定义

支持 SqlDataSource 控件并为数据绑定控件提供一个接口,以便对关系数据库执行 SQL 数据操作。Supports the SqlDataSource control and provides an interface for data-bound controls to perform SQL data operations against relational databases.

public ref class SqlDataSourceView : System::Web::UI::DataSourceView, System::Web::UI::IStateManager
public class SqlDataSourceView : System.Web.UI.DataSourceView, System.Web.UI.IStateManager
type SqlDataSourceView = class
    inherit DataSourceView
    interface IStateManager
Public Class SqlDataSourceView
Inherits DataSourceView
Implements IStateManager
继承
SqlDataSourceViewSqlDataSourceViewSqlDataSourceViewSqlDataSourceView
派生
实现

注解

SqlDataSourceView类主要用于数据绑定控件, 而不是页代码中的可编程对象。The SqlDataSourceView class is intended primarily to be used by data-bound controls, and not as a programmable object in page code.

ASP.NET 数据源控件包含一个或多个数据列表, 由数据源视图对象表示。ASP.NET data source controls contain one or more lists of data, represented by data source view objects. 类扩展类,SqlDataSource定义与其关联的控件的功能, 并实现数据源控件的基本DataSourceView数据功能 SqlDataSourceViewThe SqlDataSourceView class extends the DataSourceView class, defines the capabilities of the SqlDataSource control with which it is associated, and implements the basic data functionality for the data source control. SqlDataSource Select Update Insert类实现控件的数据功能, 包括、、和Delete操作、排序、筛选和管理保存在视图中的设置SqlDataSourceView状态.The SqlDataSourceView class implements the data functionality for the SqlDataSource control, including the Select, Update, Insert, and Delete operations, sorting, filtering, and managing settings that are kept in view state.

尽管该SqlDataSourceView对象不是SqlDataSource由控件直接向页面开发人员公开的, 但它的许多属性都是。Although the SqlDataSourceView object is not directly exposed to page developers by the SqlDataSource control, many of its properties are. 数据源视图执行的最基本操作是使用Select方法从基础数据库中检索数据, 该方法将IEnumerable检索数据项的集合。The most basic operation that a data source view performs is data retrieval from the underlying database using the Select method, which retrieves an IEnumerable collection of data items. SqlDataSourceView类使用 SQL 查询从关系数据库中实现数据检索。The SqlDataSourceView class implements data retrieval from relational databases using SQL queries. 可以对 SQL 查询进行参数化以提高灵活性和安全性。The SQL queries can be parameterized for greater flexibility and security. 以下数据检索方法、属性和事件由SqlDataSourceView实现并直接由其SqlDataSource控件向页面开发人员和其他调用方公开:The following data retrieval methods, properties, and events are implemented by the SqlDataSourceView and exposed directly by its SqlDataSource control to page developers and other callers:

SqlDataSourceView对象支持使用 SQL 命令更新关系数据库中的数据。The SqlDataSourceView object supports updating data in a relational database using SQL commands. 可以参数化 SQL 命令以提高灵活性和安全性。The SQL commands can be parameterized for greater flexibility and security. 数据绑定控件 (如GridViewDetailsView) 可以配置为使用自动SqlDataSourceView执行更新, 而其他控件则不能。Data-bound controls, such as the GridView and DetailsView, can be configured to perform updates automatically using the SqlDataSourceView, while other controls cannot. 以下更新方法、属性和事件由SqlDataSourceView实现并直接由其SqlDataSource控件向页面开发人员和其他调用方公开:The following update methods, properties, and events are implemented by the SqlDataSourceView and exposed directly by its SqlDataSource control to page developers and other callers:

SqlDataSourceView支持向关系数据库中插入新的数据行。The SqlDataSourceView supports inserting new rows of data into a relational database. 可以参数化InsertCommand属性中指定的 SQL 命令, 以提高灵活性和安全性。The SQL commands that are specified in the InsertCommand property can be parameterized for greater flexibility and security. 数据绑定控件 (如GridViewDetailsView) 可以配置为使用自动SqlDataSourceView执行插入, 而其他控件则不能。Data-bound controls, such as the GridView and DetailsView, can be configured to perform inserts automatically using the SqlDataSourceView, while other controls cannot. 以下插入方法、属性和事件由SqlDataSourceView实现并直接由其SqlDataSource控件向页面开发人员和其他调用方公开:The following insert methods, properties, and events are implemented by the SqlDataSourceView and exposed directly by its SqlDataSource control to page developers and other callers:

SqlDataSourceView对象还支持从关系数据库中删除数据。The SqlDataSourceView object also supports deleting data from a relational database. 与其他命令一样, 可以将DeleteCommand属性中指定的 SQL 命令参数化, 以提高灵活性和安全性。As with other commands, the SQL commands that are specified in the DeleteCommand property can be parameterized for greater flexibility and security. 数据绑定控件 (如GridViewDetailsView) 可以配置为使用自动SqlDataSourceView执行删除, 而其他控件则不能。Data-bound controls, such as the GridView and DetailsView, can be configured to perform deletes automatically using the SqlDataSourceView, while other controls cannot. 以下 delete 方法、属性和事件由SqlDataSourceView实现并直接由其SqlDataSource控件向页面开发人员和其他调用方公开:The following delete methods, properties, and events are implemented by the SqlDataSourceView and exposed directly by its SqlDataSource control to page developers and other callers:

当数据检索过程中用于筛选数据的子句为动态时, 数据检索功能更强大。Data retrieval is more powerful when the clause that is used to filter the data during data retrieval is dynamic. 换句话说, 带有 static WHERE 子句的 SQL 查询并不像 SQL 查询那样灵活和强大, 其中 WHERE 子句中的值绑定到可以更改的值, 例如在 Web 窗体页上的控件中显示的值。In other words, an SQL query with a static WHERE clause is not as flexible and powerful as an SQL query where the values in the WHERE clause are bound to values that can change, such as values that are displayed in controls on a Web Forms page. 您可以SelectCommand FilterExpression使用和FilterParameters属性将动态筛选应用到数据检索, 而不是在每次加载页面时重新生成 SQL 查询并设置属性。Instead of rebuilding an SQL query and setting the SelectCommand property on every page load, you can use the FilterExpression and FilterParameters properties to apply dynamic filtering to data retrieval. 这些属性由实现SqlDataSourceView并由其SqlDataSource控件直接向数据绑定控件和其他调用方公开。These properties are implemented by the SqlDataSourceView and exposed directly by its SqlDataSource control to data-bound controls and other callers.

您可以通过添加 ORDER by 子句来对通过SqlDataSource控件检索的数据进行排序, 这会导致数据库在检索数据时执行排序, 或在检索数据后对内存中的数据进行排序。You can sort the data that you retrieve with the SqlDataSource control by adding an ORDER BY clause, which causes the database to perform the ordering for you when you retrieve data or by ordering the data in memory after it is retrieved. SqlDataSourceView通过DataSourceSelectArguments设置传递给Select方法的对象的属性,可以向提供排序表达式。SortExpressionYou can supply a sorting expression to the SqlDataSourceView by setting the SortExpression property of the DataSourceSelectArguments object that is passed to the Select method. SortExpression属性的语法与DataView.Sort属性的语法相同。The syntax for the SortExpression property is the same as the syntax for a DataView.Sort property. 如果使用存储过程来检索数据, 则还可以使用SortParameterName属性指定一个参数, 该参数专用于对存储过程调用的结果进行排序。If you use a stored procedure to retrieve data, you can also use the SortParameterName property to specify a parameter that is used specifically for sorting the results of a stored procedure call.

当多个用户可以同时更改数据库时, 可能会发生并发冲突。When more than one user can change the database concurrently, there is the potential for concurrency conflict. SqlDataSource 控件SqlDataSource.ConflictDetection通过属性控制并发。The SqlDataSource control has controls concurrency through the SqlDataSource.ConflictDetection property. 此功能是在SqlDataSourceView.ConflictDetection属性中实现的。The functionality is implemented in the SqlDataSourceView.ConflictDetection property.

与许多其他 Web 服务器控件一样, SqlDataSourceView还实现IStateManager了接口, 并使用视图状态来跟踪页面请求之间的状态。Like many other Web server controls, the SqlDataSourceView implements the IStateManager interface and uses view state to track its state across page requests. 提供和属性LoadViewState的实现, 以及、 SaveViewStateTrackViewState方法, 以便为控件启用视图状态跟踪。 IsTrackingViewStateImplementations of the IsTrackingViewState and property and the LoadViewState, SaveViewState, and TrackViewState methods are provided to enable view state tracking for the control. 有关详细信息, 请参阅ASP.NET 状态管理概述For more information, see ASP.NET State Management Overview.

构造函数

SqlDataSourceView(SqlDataSource, String, HttpContext) SqlDataSourceView(SqlDataSource, String, HttpContext) SqlDataSourceView(SqlDataSource, String, HttpContext) SqlDataSourceView(SqlDataSource, String, HttpContext)

初始化 SqlDataSourceView 类的新实例,该类将指定的 SqlDataSource 控件设置为当前视图的所有者。Initializes a new instance of the SqlDataSourceView class setting the specified SqlDataSource control as the owner of the current view.

属性

CancelSelectOnNullParameter CancelSelectOnNullParameter CancelSelectOnNullParameter CancelSelectOnNullParameter

获取或设置一个值,该值指示当 SelectParameters 集合中包含的任何一个参数为 null 时,是否取消数据检索操作。Gets or sets a value indicating whether a data retrieval operation is canceled when any parameter that is contained in the SelectParameters collection evaluates to null.

CanDelete CanDelete CanDelete CanDelete

获取一个值,该值指示与当前的 SqlDataSourceView 控件关联的 SqlDataSource 对象是否支持删除操作。Gets a value indicating whether the SqlDataSourceView object that is associated with the current SqlDataSource control supports the delete operation.

CanInsert CanInsert CanInsert CanInsert

获取一个值,该值指示与当前的 SqlDataSourceView 控件关联的 SqlDataSource 对象是否支持插入操作。Gets a value indicating whether the SqlDataSourceView object that is associated with the current SqlDataSource control supports the insert operation.

CanPage CanPage CanPage CanPage

获取一个值,该值指示与当前的 SqlDataSourceView 控件关联的 SqlDataSource 对象是否支持将检索的数据分页。Gets a value indicating whether the SqlDataSourceView object that is associated with the current SqlDataSource control supports the paging of retrieved data.

CanRetrieveTotalRowCount CanRetrieveTotalRowCount CanRetrieveTotalRowCount CanRetrieveTotalRowCount

获取一个值,该值指示与当前的 SqlDataSourceView 控件关联的 SqlDataSource 对象除了支持检索数据集外,是否还支持检索数据行总数。Gets a value indicating whether the SqlDataSourceView object that is associated with the current SqlDataSource control supports retrieving the total number of data rows, in addition to the set of data.

CanSort CanSort CanSort CanSort

获取一个值,该值指示与当前的 SqlDataSourceView 控件关联的 SqlDataSource 对象是否支持检索的数据的排序视图。Gets a value indicating whether the SqlDataSourceView object that is associated with the current SqlDataSource control supports a sorted view on the retrieved data.

CanUpdate CanUpdate CanUpdate CanUpdate

获取一个值,该值指示与当前的 SqlDataSourceView 控件关联的 SqlDataSource 对象是否支持更新操作。Gets a value indicating whether the SqlDataSourceView object that is associated with the current SqlDataSource control supports the update operation.

ConflictDetection ConflictDetection ConflictDetection ConflictDetection

获取或设置值,该值指示操作期间基础数据库中的一行数据更改时,SqlDataSource 控件如何执行更新和删除。Gets or sets the value indicating how the SqlDataSource control performs updates and deletes when data in a row in the underlying database changes during the time of the operation.

DeleteCommand DeleteCommand DeleteCommand DeleteCommand

获取或设置 SqlDataSourceView 对象用于从基础数据库中删除数据的 SQL 字符串。Gets or sets the SQL string that the SqlDataSourceView uses to delete data from the underlying database.

DeleteCommandType DeleteCommandType DeleteCommandType DeleteCommandType

获取或设置一个值,该值指示 DeleteCommand 属性中的文本是 SQL 语句还是存储过程的名称。Gets or sets a value indicating whether the text in the DeleteCommand property is a SQL statement or the name of a stored procedure.

DeleteParameters DeleteParameters DeleteParameters DeleteParameters

获取参数集合,该集合包含由 DeleteCommand 属性使用的参数。Gets the parameters collection containing the parameters that are used by the DeleteCommand property.

Events Events Events Events

获取数据源视图的事件处理程序委托的列表。Gets a list of event-handler delegates for the data source view.

(Inherited from DataSourceView)
FilterExpression FilterExpression FilterExpression FilterExpression

获取或设置调用 Select 方法时应用的筛选表达式。Gets or sets a filtering expression that is applied when the Select method is called.

FilterParameters FilterParameters FilterParameters FilterParameters

获取与 FilterExpression 字符串中的任何参数占位符关联的参数的集合。Gets a collection of parameters that are associated with any parameter placeholders in the FilterExpression string.

InsertCommand InsertCommand InsertCommand InsertCommand

获取或设置 SqlDataSourceView 对象用来将数据插入到基础数据库中的 SQL 字符串。Gets or sets the SQL string that the SqlDataSourceView object uses to insert data into the underlying database.

InsertCommandType InsertCommandType InsertCommandType InsertCommandType

获取或设置一个值,该值指示 InsertCommand 属性中的文本是 SQL 语句还是存储过程的名称。Gets or sets a value indicating whether the text in the InsertCommand property is a SQL statement or the name of a stored procedure.

InsertParameters InsertParameters InsertParameters InsertParameters

获取参数集合,该集合包含由 InsertCommand 属性使用的参数。Gets the parameters collection containing the parameters that are used by the InsertCommand property.

IsTrackingViewState IsTrackingViewState IsTrackingViewState IsTrackingViewState

获取一个值,该值指示 SqlDataSourceView 对象是否保存对其视图状态的更改。Gets a value indicating whether the SqlDataSourceView object is saving changes to its view state.

Name Name Name Name

获取数据源视图的名称。Gets the name of the data source view.

(Inherited from DataSourceView)
OldValuesParameterFormatString OldValuesParameterFormatString OldValuesParameterFormatString OldValuesParameterFormatString

获取或设置一个格式字符串,该字符串应用于传递给 DeleteUpdate 方法的所有参数的名称。Gets or sets a format string to apply to the names of any parameters that are passed to the Delete or Update method.

ParameterPrefix ParameterPrefix ParameterPrefix ParameterPrefix

获取用作参数化 SQL 查询中的参数占位符前缀的字符串。Gets the string that is used to prefix a parameter placeholder in a parameterized SQL query.

SelectCommand SelectCommand SelectCommand SelectCommand

获取或设置 SqlDataSourceView 对象用来从基础数据库检索数据的 SQL 字符串。Gets or sets the SQL string that the SqlDataSourceView object uses to retrieve data from the underlying database.

SelectCommandType SelectCommandType SelectCommandType SelectCommandType

获取或设置一个值,该值指示 SelectCommand 属性中的文本是 SQL 查询还是存储过程的名称。Gets or sets a value indicating whether the text in the SelectCommand property is a SQL query or the name of a stored procedure.

SelectParameters SelectParameters SelectParameters SelectParameters

获取参数集合,该集合包含由 SelectCommand 属性使用的参数。Gets the parameters collection containing the parameters that are used by the SelectCommand property.

SortParameterName SortParameterName SortParameterName SortParameterName

获取或设置存储过程参数的名称,在使用存储过程执行数据检索时,该存储过程参数用于对检索到的数据进行排序。Gets or sets the name of a stored procedure parameter that is used to sort retrieved data when data retrieval is performed using a stored procedure.

UpdateCommand UpdateCommand UpdateCommand UpdateCommand

获取或设置 SqlDataSourceView 对象用来更新基础数据库中的数据的 SQL 字符串。Gets or sets the SQL string that the SqlDataSourceView object uses to update data in the underlying database.

UpdateCommandType UpdateCommandType UpdateCommandType UpdateCommandType

获取或设置一个值,该值指示 UpdateCommand 属性中的文本是 SQL 语句还是存储过程的名称。Gets or sets a value indicating whether the text in the UpdateCommand property is a SQL statement or the name of a stored procedure.

UpdateParameters UpdateParameters UpdateParameters UpdateParameters

获取参数集合,该集合包含由 UpdateCommand 属性使用的参数。Gets the parameters collection containing the parameters that are used by the UpdateCommand property.

方法

CanExecute(String) CanExecute(String) CanExecute(String) CanExecute(String)

确定是否能执行指定命令。Determines whether the specified command can be executed.

(Inherited from DataSourceView)
Delete(IDictionary, IDictionary) Delete(IDictionary, IDictionary) Delete(IDictionary, IDictionary) Delete(IDictionary, IDictionary)

使用 DeleteCommand SQL 字符串、DeleteParameters 集合中指定的任何参数,以及指定的 keysoldValues 集合中的值执行删除操作。Performs a delete operation using the DeleteCommand SQL string, any parameters that are specified in the DeleteParameters collection, and the values that are in the specified keys and oldValues collections.

Delete(IDictionary, IDictionary, DataSourceViewOperationCallback) Delete(IDictionary, IDictionary, DataSourceViewOperationCallback) Delete(IDictionary, IDictionary, DataSourceViewOperationCallback) Delete(IDictionary, IDictionary, DataSourceViewOperationCallback)

DataSourceView 对象所表示的数据列表执行异步删除操作。Performs an asynchronous delete operation on the list of data that the DataSourceView object represents.

(Inherited from DataSourceView)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExecuteCommand(String, IDictionary, IDictionary) ExecuteCommand(String, IDictionary, IDictionary) ExecuteCommand(String, IDictionary, IDictionary) ExecuteCommand(String, IDictionary, IDictionary)

执行指定的命令。Executes the specified command.

(Inherited from DataSourceView)
ExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback) ExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback) ExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback) ExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)

执行指定的命令。Executes the specified command.

(Inherited from DataSourceView)
ExecuteDelete(IDictionary, IDictionary) ExecuteDelete(IDictionary, IDictionary) ExecuteDelete(IDictionary, IDictionary) ExecuteDelete(IDictionary, IDictionary)

使用 DeleteCommand SQL 字符串、DeleteParameters 集合中指定的任何参数,以及指定的 keysoldValues 集合中的值执行删除操作。Performs a delete operation using the DeleteCommand SQL string, any parameters that are specified in the DeleteParameters collection, and the values that are in the specified keys and oldValues collections.

ExecuteInsert(IDictionary) ExecuteInsert(IDictionary) ExecuteInsert(IDictionary) ExecuteInsert(IDictionary)

使用 InsertCommand SQL 字符串、InsertParameters 集合中指定的所有参数,以及指定的 values 集合中的值执行插入操作。Performs an insert operation using the InsertCommand SQL string, any parameters that are specified in the InsertParameters collection, and the values that are in the specified values collection.

ExecuteSelect(DataSourceSelectArguments) ExecuteSelect(DataSourceSelectArguments) ExecuteSelect(DataSourceSelectArguments) ExecuteSelect(DataSourceSelectArguments)

使用 SelectCommand SQL 字符串以及 SelectParameters 集合中的所有参数从基础数据库中检索数据。Retrieves data from the underlying database using the SelectCommand SQL string and any parameters that are in the SelectParameters collection.

ExecuteUpdate(IDictionary, IDictionary, IDictionary) ExecuteUpdate(IDictionary, IDictionary, IDictionary) ExecuteUpdate(IDictionary, IDictionary, IDictionary) ExecuteUpdate(IDictionary, IDictionary, IDictionary)

使用 UpdateCommand SQL 字符串、UpdateParameters 集合中的所有参数,以及指定的 keysvaluesoldValues 集合中的值执行更新操作。Performs an update operation using the UpdateCommand SQL string, any parameters that are in the UpdateParameters collection, and the values that are in the specified keys, values, and oldValues collections.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
Insert(IDictionary) Insert(IDictionary) Insert(IDictionary) Insert(IDictionary)

使用 InsertCommand SQL 字符串、InsertParameters 集合中指定的所有参数,以及指定的 values 集合中的值执行插入操作。Performs an insert operation using the InsertCommand SQL string, any parameters that are specified in the InsertParameters collection, and the values that are in the specified values collection.

Insert(IDictionary, DataSourceViewOperationCallback) Insert(IDictionary, DataSourceViewOperationCallback) Insert(IDictionary, DataSourceViewOperationCallback) Insert(IDictionary, DataSourceViewOperationCallback)

DataSourceView 对象所表示的数据列表执行异步插入操作。Performs an asynchronous insert operation on the list of data that the DataSourceView object represents.

(Inherited from DataSourceView)
LoadViewState(Object) LoadViewState(Object) LoadViewState(Object) LoadViewState(Object)

还原数据源视图的以前保存的视图状态。Restores the previously saved view state for the data source view.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
OnDataSourceViewChanged(EventArgs) OnDataSourceViewChanged(EventArgs) OnDataSourceViewChanged(EventArgs) OnDataSourceViewChanged(EventArgs)

引发 DataSourceViewChanged 事件。Raises the DataSourceViewChanged event.

(Inherited from DataSourceView)
OnDeleted(SqlDataSourceStatusEventArgs) OnDeleted(SqlDataSourceStatusEventArgs) OnDeleted(SqlDataSourceStatusEventArgs) OnDeleted(SqlDataSourceStatusEventArgs)

Deleted 控件完成删除操作后引发 SqlDataSource 事件。Raises the Deleted event after the SqlDataSource control has completed a delete operation.

OnDeleting(SqlDataSourceCommandEventArgs) OnDeleting(SqlDataSourceCommandEventArgs) OnDeleting(SqlDataSourceCommandEventArgs) OnDeleting(SqlDataSourceCommandEventArgs)

Deleting 控件尝试删除操作前引发 SqlDataSource 事件。Raises the Deleting event before the SqlDataSource control attempts a delete operation.

OnFiltering(SqlDataSourceFilteringEventArgs) OnFiltering(SqlDataSourceFilteringEventArgs) OnFiltering(SqlDataSourceFilteringEventArgs) OnFiltering(SqlDataSourceFilteringEventArgs)

Filtering 控件筛选选择操作结果前引发 SqlDataSource 事件。Raises the Filtering event before the SqlDataSource control filters the results of a select operation.

OnInserted(SqlDataSourceStatusEventArgs) OnInserted(SqlDataSourceStatusEventArgs) OnInserted(SqlDataSourceStatusEventArgs) OnInserted(SqlDataSourceStatusEventArgs)

Inserted 控件完成插入操作后引发 SqlDataSource 事件。Raises the Inserted event after the SqlDataSource control has completed an insert operation.

OnInserting(SqlDataSourceCommandEventArgs) OnInserting(SqlDataSourceCommandEventArgs) OnInserting(SqlDataSourceCommandEventArgs) OnInserting(SqlDataSourceCommandEventArgs)

Inserting 控件尝试插入操作前引发 SqlDataSource 事件。Raises the Inserting event before the SqlDataSource control attempts an insert operation.

OnSelected(SqlDataSourceStatusEventArgs) OnSelected(SqlDataSourceStatusEventArgs) OnSelected(SqlDataSourceStatusEventArgs) OnSelected(SqlDataSourceStatusEventArgs)

Selected 控件完成数据检索操作后引发 SqlDataSource 事件。Raises the Selected event after the SqlDataSource control has completed a data retrieval operation.

OnSelecting(SqlDataSourceSelectingEventArgs) OnSelecting(SqlDataSourceSelectingEventArgs) OnSelecting(SqlDataSourceSelectingEventArgs) OnSelecting(SqlDataSourceSelectingEventArgs)

Selecting 控件尝试数据检索操作前引发 SqlDataSource 事件。Raises the Selecting event before the SqlDataSource control attempts a data retrieval operation.

OnUpdated(SqlDataSourceStatusEventArgs) OnUpdated(SqlDataSourceStatusEventArgs) OnUpdated(SqlDataSourceStatusEventArgs) OnUpdated(SqlDataSourceStatusEventArgs)

Updated 控件完成更新操作后引发 SqlDataSource 事件。Raises the Updated event after the SqlDataSource control has completed an update operation.

OnUpdating(SqlDataSourceCommandEventArgs) OnUpdating(SqlDataSourceCommandEventArgs) OnUpdating(SqlDataSourceCommandEventArgs) OnUpdating(SqlDataSourceCommandEventArgs)

Updating 控件尝试更新操作前引发 SqlDataSource 事件。Raises the Updating event before the SqlDataSource control attempts an update operation.

RaiseUnsupportedCapabilityError(DataSourceCapabilities) RaiseUnsupportedCapabilityError(DataSourceCapabilities) RaiseUnsupportedCapabilityError(DataSourceCapabilities) RaiseUnsupportedCapabilityError(DataSourceCapabilities)

对照视图支持的功能比较为 ExecuteSelect(DataSourceSelectArguments) 操作请求的功能,由 RaiseUnsupportedCapabilitiesError(DataSourceView) 方法调用。Compares the capabilities that are requested for an ExecuteSelect(DataSourceSelectArguments) operation against those that the view supports and is called by the RaiseUnsupportedCapabilitiesError(DataSourceView) method.

SaveViewState() SaveViewState() SaveViewState() SaveViewState()

保存自页回发到服务器后 SqlDataSourceView 控件的视图状态更改。Saves the changes to the view state for the SqlDataSourceView control since the time that the page was posted back to the server.

Select(DataSourceSelectArguments) Select(DataSourceSelectArguments) Select(DataSourceSelectArguments) Select(DataSourceSelectArguments)

使用 SelectCommand SQL 字符串以及 SelectParameters 集合中的所有参数从基础数据库中检索数据。Retrieves data from the underlying database using the SelectCommand SQL string and any parameters that are in the SelectParameters collection.

Select(DataSourceSelectArguments, DataSourceViewSelectCallback) Select(DataSourceSelectArguments, DataSourceViewSelectCallback) Select(DataSourceSelectArguments, DataSourceViewSelectCallback) Select(DataSourceSelectArguments, DataSourceViewSelectCallback)

从基础数据存储中异步获取数据列表。Gets a list of data asynchronously from the underlying data storage.

(Inherited from DataSourceView)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
TrackViewState() TrackViewState() TrackViewState() TrackViewState()

使 SqlDataSourceView 对象跟踪其视图状态的更改,以便这些更改可以存储在控件的 StateBag 对象中并且能够在同一页的不同请求间保持。Causes the SqlDataSourceView object to track changes to its view state so that the changes can be stored in the StateBag object for the control and persisted across requests for the same page.

Update(IDictionary, IDictionary, IDictionary) Update(IDictionary, IDictionary, IDictionary) Update(IDictionary, IDictionary, IDictionary) Update(IDictionary, IDictionary, IDictionary)

使用 UpdateCommand SQL 字符串、UpdateParameters 集合中的所有参数,以及指定的 keysvaluesoldValues 集合中的值执行更新操作。Performs an update operation using the UpdateCommand SQL string, any parameters that are in the UpdateParameters collection, and the values that are in the specified keys, values, and oldValues collections.

Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback) Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback) Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback) Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback)

DataSourceView 对象所表示的数据列表执行异步更新操作。Performs an asynchronous update operation on the list of data that the DataSourceView object represents.

(Inherited from DataSourceView)

事件

DataSourceViewChanged DataSourceViewChanged DataSourceViewChanged DataSourceViewChanged

在数据源视图更改时发生。Occurs when the data source view has changed.

(Inherited from DataSourceView)
Deleted Deleted Deleted Deleted

完成删除操作后发生。Occurs when a delete operation has completed.

Deleting Deleting Deleting Deleting

执行删除操作前发生。Occurs before a delete operation.

Filtering Filtering Filtering Filtering

执行筛选操作前发生。Occurs before a filter operation.

Inserted Inserted Inserted Inserted

完成插入操作后发生。Occurs when an insert operation has completed.

Inserting Inserting Inserting Inserting

执行插入操作前发生。Occurs before an insert operation.

Selected Selected Selected Selected

数据检索操作完成后发生。Occurs when a data retrieval operation has completed.

Selecting Selecting Selecting Selecting

执行数据检索操作前发生。Occurs before a data retrieval operation.

Updated Updated Updated Updated

完成更新操作后发生。Occurs when an update operation has completed.

Updating Updating Updating Updating

执行更新操作前发生。Occurs before an update operation.

显式界面实现

IStateManager.IsTrackingViewState IStateManager.IsTrackingViewState IStateManager.IsTrackingViewState IStateManager.IsTrackingViewState

有关此成员的说明,请参见 IsTrackingViewStateFor a description of this member, see IsTrackingViewState.

IStateManager.LoadViewState(Object) IStateManager.LoadViewState(Object) IStateManager.LoadViewState(Object) IStateManager.LoadViewState(Object)

有关此成员的说明,请参见 LoadViewState(Object)For a description of this member, see LoadViewState(Object).

IStateManager.SaveViewState() IStateManager.SaveViewState() IStateManager.SaveViewState() IStateManager.SaveViewState()

有关此成员的说明,请参见 SaveViewState()For a description of this member, see SaveViewState().

IStateManager.TrackViewState() IStateManager.TrackViewState() IStateManager.TrackViewState() IStateManager.TrackViewState()

有关此成员的说明,请参见 TrackViewState()For a description of this member, see TrackViewState().

适用于

另请参阅