System.Web 2.0.0.0 System.Web.UI.DataSourceView System.Web.UI.IStateManager

The class is intended primarily to be used by data-bound controls, and not as a programmable object in page code.

The class implements the data functionality for the control, including the , , , and operations, sorting, filtering, and management of settings kept in view state.

A object is created for each instance of the class at run time. Calls to data operations of the instance of the class are handled by the instance of the object. Page developers do not access the instance of the class directly. Control developers can create custom data controls by extending the and classes.

The class performs data operations by calling methods on business or data objects using reflection. At run time, the control creates an instance of the type that is identified by the property, and then calls the appropriate method for the data operation. The instantiated object is not cached in memory by the . The object is created and destroyed for every data method call. If the method is static (Shared in Visual Basic), an instance is not created but the data operation method is still called.

The is not directly exposed to page developers by the control. Instead, the properties and methods of the are accessed through the . For example, the of property is set by setting the property of the .

## Retrieving Data

The most basic operation that a data source view performs is data retrieval from the underlying data storage using the method, which retrieves an collection of data items. The following data retrieval methods, properties, and events are implemented by the object and exposed directly by its control to page developers and other callers:

The method

The property

The property

The event

The event

## Updating Data

The object supports data updates by calling a business or data object method that is identified by the property. Data-bound controls that automatically perform updates, such as the and controls, pass their parameters in an interface to the and the view object merges these parameters with any parameters that are found in the collection.

The following update methods, properties, and events are implemented by the and exposed directly by its control to page developers and other callers:

The method

The property

The property

The event

The event

## Inserting Data

The object supports inserting new rows of data by calling a business or data object method that is identified by the property. Data-bound controls that automatically perform inserts, such as the and , pass their parameters in an interface to the and the view object merges these parameters with any parameters that are found in the collection.

The following insert methods, properties, and events are implemented by the and exposed directly by its control to page developers and other callers:

The method

The property

The property

The event

The event

## Deleting Data

The object supports deleting data by calling a business or data object method that is identified by the property. Data-bound controls that automatically perform deletes, such as the and , pass their parameters in an interface to the and the view object merges these parameters with any parameters that are found in the collection. The following delete methods, properties, and events are implemented by the and exposed directly by its control to page developers and other callers:

The method

The property

The property

The event

The event

## Filtering and Sorting Data

Data retrieval is more powerful when you can filter the data dynamically. Filtering is supported only by the control if the method returns a or object. You can use the and properties to apply dynamic filtering to data retrieval. These properties are implemented by the object and exposed directly by its control to data-bound controls and other callers.

You can sort the data that you retrieve with the by ordering the data in memory after it is retrieved. Sorting is supported only by the control if the method returns a or . The property always returns true, because the cannot determine what type is returned by the method without calling the method. The property syntax is the same as for a property.

## Tracking View State

The implements the interface and uses view state to track its state across page requests. Implementation of the , , and methods are provided to enable view state tracking for the control. For more information, see ASP.NET State Management Overview.

Supports the control and provides an interface for data-bound controls to perform data operations with business and data objects.

- Constructor

  The constructor is called by the method to return a new instance of a data source view with the specified parameter. The control is associated with only one at any time, and always names the view DefaultView, although this naming restriction is imposed by the control, not the . You can override the method to support views with a different naming convention.

  The object that is passed by is used by the data source view to access parameter objects, such as and properties.

  Initializes a new instance of the class.

  The that the is associated with.
  A unique name for the data source view, within the scope of the data source control that owns it.
  The current .
  2.0.0.0
- Property
  System.Boolean To be added.

  The property returns true, if the property is set. A delete operation could still fail, if all the data properties are not set or are not set correctly.

  Gets a value indicating whether the object that is associated with the current control supports the delete operation.

  2.0.0.0
- Property
  System.Boolean To be added.

  The property returns true, if the property is set. A insert operation could still fail, if all the data properties are not set or are not set correctly.

  Gets a value indicating whether the object that is associated with the current control supports the insert operation.

  2.0.0.0
- Property
  System.Boolean To be added.

  The property indicates whether the object supports paging. For information on how paging is supported by the , see .

  Gets a value indicating whether the object that is associated with the current control supports paging through the retrieved data.

  2.0.0.0
- Property
  System.Boolean To be added.

  The property returns true, if the property is set. The method that returns the count should return the total number of rows that can be paged, not the number of rows in a page. Data-bound controls use the total number of rows that can be paged to determine how to render paging controls. For example, how many numeric pager buttons to render in a control pager. For more information on paging support, see .

  The property is checked during a call to the method to ensure that the data source control supports all capabilities requested by setting the various properties.

  Gets a value indicating whether the object that is associated with the current control supports retrieving the total number of data rows, in addition to the set of data.

  2.0.0.0
- Property
  System.Boolean To be added.

  Because the control only supports sorting data when the method returns a , , or object, the view object cannot determine whether sorting is supported until the method is called and returns. For this reason, the property always returns true.

  Gets a value indicating whether the object that is associated with the current control supports a sorted view on the underlying data source.

  2.0.0.0
- Property
  System.Boolean To be added.

  The property returns true, if the property is set. A update operation could still fail, if all the data properties are not set or are not set correctly.

  Gets a value indicating whether the object that is associated with the current control supports the update operation.

  2.0.0.0
- Property
  System.Web.UI.ConflictOptions To be added.

  The property determines whether parameters for old and new values are applied to the Update method. For example, if the method that is specified by the property returns a object with the columns Name and Number, and the property is set to the value, parameters are created for Name and Number for the Update method. If the property is set to the value, parameters are created with the names Name, Number, original_Name, and original_Name. (The exact name of the parameters for the original values depends on the .) The then determines if the method that is specified in the property has parameters that match.

  Concurrency control is a technique data stores use to control how data is read and changed in the store when multiple clients are accessing and manipulating the same data. For example, one client reads data and presents it to a user, while another client reads the same data, and presents it to a different user. If both users update the data and submit it to the data storage, some unexpected result might occur, because both clients might update different values for the same data. This is considered a conflict. By setting the property to the value, the Update method can then compare the old and new values to the original data source to detect conflicts and handle them, as necessary.

  The value of the property is stored in view state.

  Gets or sets a value that determines how the control performs updates and deletes when data in a row in the underlying data storage changes during the time of the operation.

  2.0.0.0
- Property
  System.Boolean To be added.

  Not converting null to the value can result in errors at run time. Use the property to indicate whether the values that are passed to an update, insert, or a delete operation are automatically converted from null to the value. For more information, see .

  Gets or sets a value indicating whether values that are passed to an update, insert, or delete operation are automatically converted from null to the value.

  2.0.0.0
- Property
  System.String To be added.

  Instead of specifying several parameters that are passed to the Select, Update, Insert, and Delete methods, you can create one object that aggregates several items. This one object is passed to the methods, instead of several parameters. For more information see .

  Gets or sets the name of a class that the control uses for a parameter in a data operation. The control uses the specified class instead of the objects that are in the various parameters collections.

  2.0.0.0
- Method
  System.Int32 `` ``

  The default value is -1, which means that an unknown number of rows were deleted. To return a different value, set the property of the object of the event handler. The number of affected rows is typically returned by the Delete method for the business object, and that value is available from the property of the parameter of the event handler.

  The method calls the method, passing the and collections.

  Performs a delete operation by calling the business object method that is identified by the property using the specified and collections.

  The number of rows deleted; otherwise, -1, if the number is not known.

  A of the key values used to identify the item to delete. These parameters are used with the property to perform the delete operation. If there are no parameters associated with the method, pass null. A that contains the additional non-key values used to match the item in the data source. Row values are passed to the method only if the property is set to the field. 2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler

  Handle the event to examine the values of a return value and output parameters or to determine whether an exception was thrown after a operation has completed. The return value, output parameters, and exception handling properties are available from the object that is associated with the event.

  For more information about handling events, see Consuming Events.

  Occurs when a operation has completed.

  2.0.0.0
- Property
  System.String To be added.

  The method that is identified by the property can be an instance method or a static (Shared in Visual Basic) method. If it is an instance method, the business object is created and destroyed each time the method specified by the property is called. You can handle the event to work with the business object before the method specified by the property is called. You can also handle the event that is raised after the method specified by the property is called. If the method is a static (Shared in Visual Basic) method, the business object is never created and you cannot handle these events.

  If the business object that the control works with implements more than one method or function with the same name (method overloads), the data source control attempts to invoke the correct one according to a set of conditions, including the parameters in the collection. If the parameters in the collection do not match those of the method signature, the data source throws an exception.

  The value of the property is stored in view state.

  For more information, see .

  Gets or sets the name of the method or function that the object invokes to delete data.

  2.0.0.0
- Property
  System.Web.UI.WebControls.ParameterCollection To be added.

  The names and types of the parameters that are contained in the collection must match the names and types of the parameters that are in the method specified by the property signature. The parameter names are affected by the property and are case sensitive. When working with data-bound controls that supply parameters, such as and , the control automatically merges any parameters that are explicitly specified in the collection with those parameters that are provided by the data-bound control.

  For more information, see .

  Gets the parameters collection that contains the parameters that are used by the method.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler

  Handle the event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the control performs the operation. The parameters are available as an collection that is accessed by the property, which is exposed by the object.

  For more information about handling events, see Consuming Events.

  Occurs before a operation.

  2.0.0.0
- Property
  System.Boolean To be added.

  Paging by the control is handled by setting the , , , and properties of the and defining a Select method in the business object with the proper parameters. When the property is set to true, the collection includes two additional parameters for the first row requested and the number of rows requested. These two parameters are named as defined by the and properties. The Select method should return the requested number of rows starting at the specified index. Because the data might not divide evenly by the page size, the last page might contain fewer rows. Thus, the number of rows requested is actually the maximum number of rows that are returned.

  The property is checked during a call to the method to ensure that the data source control supports all capabilities requested by setting the various properties.

  When paging is enabled on the associated data-bound control, the data-bound control calls the Select method with the start index and number of rows that are required. Additionally, if the property is set, the data-bound control calls the method before rendering the pager controls. For example, if a control has paging enabled with a page size of 5, and the method returns 20, only 4 pages are displayed in the pager.

  The value of the property is stored in view state.

  Gets or sets a value indicating whether the data source control supports paging through the set of data that it retrieves.

  2.0.0.0
- Method
  System.Int32 `` ``

  The class implements the inherited method to delete data from an underlying data store using a business object. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed method.

  Before the delete operation is performed, the method is called to raise the event. You can handle this event to examine the values of the parameters and perform any preprocessing before the method is called.

  To perform a delete operation, the uses reflection to call the method that is identified by the property and any associated parameters in the and collections, and then executes it. After the operation completes, the method is called to raise the event. You can handle this event to examine any return values and error codes, and to perform any post-processing.

  Performs a delete operation using the method and the specified and collection.

  The number of rows deleted; otherwise, -1, if the number is not known. For more information, see .

  A of parameters used with the property to perform the delete operation. If there are no parameters associated with the method, pass null. A that contains row values that are evaluated, only if the property is set to the field. 2.0.0.0
- Method
  System.Int32 ``

  The class implements the inherited method to insert data into an underlying data store using a business object. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed method.

  Before the insert is performed, the method is called to raise the event. You can handle this event to examine the values of the parameters and perform any preprocessing before the method is called.

  To perform an insert operation, the control uses reflection to call the method that is identified by the property and any associated parameters that are in the collection, and then executes it. After the operation completes, the method is called to raise the event. You can handle this event to examine any return values, error codes, and perform any post-processing.

  For more information on returning the number of rows inserted, see .

  Performs an insert operation by calling the business object method that is identified by the property using the specified collection.

  The number of rows inserted; otherwise, -1, if the number is not known. For more information, see .

  A of parameters used with the property to perform the insert operation. If there are no parameters associated with the method, pass null. 2.0.0.0
- Method
  2.0.0.0
  System.Collections.IEnumerable ``

  The class implements the inherited method to retrieve data using a business object. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed method.

  The specified method can have any method signature, but must return one of the types for the control that are listed in the following table to call it successfully.

  Return type

  Action

  The is returned by the method.

  A is created using the and returned by the method.

  The first of the is extracted and a is created and returned by the method.

  The object is wrapped in a one-element and returned by the method.

  Before the data retrieval is performed, the method is called to raise the event. You can handle this event to examine the values of the parameters and to perform any preprocessing before an operation.

  To perform a select operation, the control uses reflection to call the method that is identified by the property and any associated parameters that are in the collection, and then executes it. After the operation completes, the method is called to raise the event. You can handle this event to examine any return values and error codes, and to perform any post-processing.

  If the method returns a object and caching is enabled, the retrieves data from and saves data to the cache during the operation. The cache is created, discarded, or refreshed based on the caching behavior that is specified by the combination of the and properties.

  If the method returns a object and a property has been specified, it is evaluated along with any supplied properties and the resulting filter is applied to the list of data during the operation.

  For information on returning the number of rows selected, see .

  Retrieves data from the object that is identified by the property by calling the method that is identified by the property and passing any values in the collection.

  A list of data rows.

  A used to request operations on the data beyond basic data retrieval.
- Method
  System.Int32 `` `` ``

  The class implements the inherited method to update data using a business object. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed method.

  The values that are contained in the and collections are evaluated and merged with any values that are contained by the collection. If the property is set to the value, the values that are contained in the collection are formatted with the property and are also merged.

  Before the update operation is performed, the method is called to raise the event. You can handle this event to examine the values of the parameters and to perform any preprocessing before an update. To perform an update operation, the uses reflection to call the method that is identified by the property and any associated parameters in the collection, and then executes it. After the operation completes, the method is called to raise the event. You can handle this event to examine any return values, error codes, and perform any post-processing.

  For more information on returning the number of rows updated, see .

  Performs an update operation by calling the method that is identified by the property and using any parameters that are supplied in the , , or collections.

  The number of rows updated; or -1, if the number is not known. For more information, see .

  A of primary keys to use with the property to perform the update database operation. If there are no keys associated with the method, pass null. A of values to be used with the to perform the update database operation. If there are no parameters associated with the method, pass null. A that represents the original values in the underlying data store. If there are no parameters associated with the query, pass null. 2.0.0.0
- Property
  System.String To be added.

  The control supports filtering data only when the method returns a , , or object.

  The syntax that is used for the property is a format string-style expression. The filter expression syntax is the same syntax that is accepted by the property because the filter expression is applied to the property of the object that is returned from executing the method. (For more information, see .) If you add parameters to the collection, you can also include format string placeholders, for example "{0}", in the expression to substitute for parameter values. The placeholders are replaced according to the index of the parameter in the collection.

  You can include parameters in the . If the type of the parameter is a string or character type, enclose the parameter in single quotation marks. Quotation marks are not needed if the parameter is a numeric type.The collection contains the parameters that are evaluated for the placeholders found in the .

  The value of the property is stored in view state.

  It is recommended that you validate any filter parameter value that you receive from the client. The runtime simply substitutes the parameter value into the filter expression and applies it to the object that is returned by the method. If you are using the property as a security measure to limit the number of items that are returned, you must validate the parameter values before the filtering occurs.

  Gets or sets a filtering expression that is applied when the business object method that is identified by the property is called.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceFilteringEventHandler

  Handle the event to perform validation operations on filter parameter values before the control performs a filter operation. You can cancel the operation by setting the property of the object to true. The event is raised, only if the property is set.

  For more information about handling events, see Consuming Events.

  You should validate any filter parameter value that you receive from the client. The runtime simply substitutes the parameter value into the filter expression and applies it to the object that is returned by the method. If you are using the property as a security measure to limit the number of items that are returned, you must validate the parameter values before the filtering occurs.

  Occurs before a filter operation.

  2.0.0.0
- Property
  System.Web.UI.WebControls.ParameterCollection To be added.

  The control supports filtering data only when the method returns a , , or object.

  The parameters in the collection are associated with any parameters that are specified in the property. The parameter placeholders that are specified in the property are matched to parameter objects in the collection when the method specified by the property is called.

  Gets a collection of parameters that are associated with any parameter placeholders that are in the string.

  2.0.0.0
- Method
  System.Int32 ``

  The default return value is -1, which means that an unknown number of rows were inserted. To return a different value, set the property of the object of the event. The number of affected rows is typically returned by the Insert method for the business object, and that value is available from the property of the object of the event.

  The method calls the method, passing the collection.

  Performs an insert operation by calling the business object method that is identified by the property using the specified collection.

  The number of rows inserted; otherwise, -1, if the number is not known.

  A collection of parameters used with the property to perform the insert operation. If there are no parameters associated with the method, pass null. 2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler

  Handle the event to examine the values of a return value and output parameters or to determine whether an exception was thrown after an operation has completed. The return value, output parameters, and exception handling properties are available from the object that is associated with the event.

  For more information about handling events, see Consuming Events.

  Occurs when an operation has completed.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler

  Handle the event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the control performs the operation. The parameters are available as an collection that is accessed by the property, which is exposed by the object.

  For more information about handling events, see Consuming Events.

  Occurs before an operation.

  2.0.0.0
- Property
  System.String To be added.

  The method that is identified by the property can be an instance method or a static (Shared in Visual Basic) method. If it is an instance method, the business object is created and destroyed each time the method specified by the property is called. You can handle the event to work with the business object before the method specified by the property is called. You can also handle the event that is raised after the method specified by the property is called. (Dispose is called, only if the business object implements the interface.) If the method is a static (Shared in Visual Basic) method, the business object is never created and you cannot handle these events.

  If the business object that the object implements more than one method or function with the same name (method overloads), the data source control attempts to invoke the correct one according to a set of conditions, including the parameters in the collection. If the parameters in the collection do not match those of the method specified by the property signature, the data source throws an exception.

  The value of the property is stored in view state.

  For more information, see .

  Gets or sets the name of the method or function that the object invokes to insert data.

  2.0.0.0
- Property
  System.Web.UI.WebControls.ParameterCollection To be added.

  The names and types of the parameters that are contained in the collection must match the names and types of the parameters that are in the method specified by the property signature. When working with data-bound controls that supply parameters, such as and , the control automatically merges any parameters that are explicitly specified in the collection with those parameters that are provided by the data-bound control. For more information, see .

  Gets the parameters collection that contains the parameters that are used by the method.

  2.0.0.0
- Property
  System.Boolean To be added. To be added.

  Gets a value indicating whether the object is saving changes to its view state.

  2.0.0.0
- Method
  System.Void ``

  This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.

  The method restores view-state information for the object from a previous page request that was saved by the method.

  Restores previously saved view state for the data source view.

  An object that represents the state to restore. 2.0.0.0
- Property
  System.String To be added.

  The property is used to support data source paging. For more information, see .

  The value of the property is stored in view state.

  Gets or sets the name of the data retrieval method parameter that is used to indicate the number of records to retrieve for data source paging support.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler

  Handle the event to call other methods on the business object, set properties, or to perform other initialization that is specific to the business object before the control calls the Data methods for the business object. A reference to the object is accessed by the property, which is exposed by the object.

  If the method that is identified to perform the data operation is static (Shared in Visual Basic), the and events are never raised.

  Occurs after the object creates an instance of the type that is identified by the property.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler

  The control automatically calls the default constructor of a business object to create and instance of it using reflection. Handle the event to explicitly call another constructor and to set the instance of the object that results to the property of the associated object.

  For more information about handling events, see Consuming Events.

  If the method that is identified to perform the data operation is static (Shared in Visual Basic), the and events are never raised.

  Occurs before the object creates an instance of the type that is identified by the property.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler

  The event is raised before the instance of the business object is discarded. If the business object implements the interface, the method is called after The event is raised.

  Handle the event to call other methods on the object and set properties or to perform clean-up that is specific to the object before the object is destroyed. A reference to the object is accessed by the property, which is exposed by the object.

  If the method that is identified to perform the data operation is static (Shared in Visual Basic), the event is never raised.

  Occurs when the object discards an instance of an object that it has created.

  2.0.0.0
- Property
  System.String To be added.

  The format string is applied to primary keys only, such as those that are identified with the DataKeyNames property of a data-bound control or in delete and update scenarios, where the property is set to the value and the set of original values that are passed to the corresponding data method.

  Two common scenarios where you might change the property are as follows:

  To differentiate between old and new values in updates. When the property is set to the value, parameters for both the original and new values are added to the collection. Without the formatting string, two parameters with the same name would be created for each data field. By changing the name of the original value parameter, you can compare the data to the original data source to detect conflicts and compare key values.

  Some visual designers implement a particular naming scheme for original values and keys.

  The value of the is stored in view state.

  Gets or sets a format string to apply to the names of the parameters for original values that are passed to the Delete or Update methods.

  2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event after the object has completed a delete operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object attempts a delete operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object attempts a filtering operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event after the object has completed an insert operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  The method is called, only if the method that is identified to perform the data operation is not static (Shared in Visual Basic).

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object attempts an insert operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  The method is called, only if the method that is identified to perform the data operation is not static (Shared in Visual Basic).

  Raising an event invokes the event handler through a delegate. For more information, see .

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event after the creates an instance of the object that is identified by the property.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object creates an instance of a business object to perform a data operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  The is called when the instance of an object that was created to perform a data operation is discarded. The Dispose method is called, only if the type that is identified by the property implements the interface.

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object discards an instantiated type.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event after the object has completed a data retrieval operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object attempts a data retrieval operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event after the object has completed an update operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Void ``

  Raising an event invokes the event handler through a delegate. For more information, see Consuming Events.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event before the object attempts an update operation.

  An that contains the event data. 2.0.0.0
- Method
  System.Object

  The method is primarily used by control developers.

  View state is the accumulation of the values of a server control's properties. These values are automatically placed in the property for the server control, which is an instance of the class. The value is then persisted to a string object after the save-state stage of the server control life cycle.

  When view state is saved, view state contents are returned to the client as a variable that is stored in an HTML Hidden element. When you author custom server controls, you can improve efficiency by overriding the method and modifying the ViewState property for your server control. For more information, see ASP.NET State Management Overview.

  Saves the changes to the view state for the object since the time when the page was posted back to the server.

  The object that contains the changes to the view state; otherwise null, if there is no view state associated with the object.

  2.0.0.0
- Method
  System.Collections.IEnumerable ``

  The method calls the passing the parameter.

  Retrieves data from the object that is identified by the property by calling the method that is identified by the property and passing any values in the collection.

  An list of data rows. For more information, see .

  A used to request operations on the data beyond basic data retrieval. 2.0.0.0
- Property
  System.String To be added.

  The identifies a business object method that is used to retrieve a total row count to support data source paging. The property is evaluated, only if the property is set to true. For information on how paging is supported by the , see .

  The value of the property is stored in view state.

  Gets or sets the name of the method or function that the control invokes to retrieve a row count.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler

  Handle the event to examine the values of a return value and output parameters or to determine whether an exception was thrown after a data retrieval operation has completed. The return value, output parameters, and exception handling properties are available from the object that is associated with the event.

  For more information about handling events, see Consuming Events.

  Occurs when a data retrieval operation has completed.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler

  Handle the event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the control performs the data retrieval operation. The parameters are available as an collection that is accessed by the property, which is exposed by the object.

  For more information about handling events, see Consuming Events.

  Occurs before a data retrieval operation.

  2.0.0.0
- Property
  System.String To be added.

  The specified method can have any method signature but must return one of the types listed in the following table in order for the control to call it successfully

  Return type

  Action

  The is returned by the method.

  A is created using the and returned by the method.

  The first of the is extracted and a is created and returned by the method.

  The object is wrapped in a one-element and returned by the method.

  The method that is identified by the property can be an instance method or a static (Shared in Visual Basic) method. If it is an instance method, the business object is created and destroyed each time the method is called. You can handle the event to work with the business object before the method specified by the property is called. You can also handle the event that is raised after the method specified by the property is called. (Dispose is called only if the business object implements the interface.) If the method is a static (Shared in Visual Basic) method, the business object is never created and you cannot handle these events.

  If the business object that the control works with implements more than one method or function with the same name (method overloads), the data source control attempts to invoke the correct one according to a set of conditions, including the parameters in the collection. If the parameters in the collection do not match those of the signature of the method specified by the property, the data source throws an exception.

  For more information, see .

  Gets or sets the name of the method or function that the control invokes to retrieve data.

  2.0.0.0
- Property
  System.Web.UI.WebControls.ParameterCollection To be added.

  The names and types of the parameters that are contained in the collection must match the names and types of the parameters that are in the method specified by the property signature. When working with data-bound controls that supply parameters, such as and , the control automatically merges any parameters that are explicitly specified in the collection with those parameters that are provided by the data-bound control. For more information, see .

  Gets the parameters collection containing the parameters that are used by the method.

  2.0.0.0
- Property
  System.String To be added.

  The property is used to support data source sorting. When a property is set on the object and passed to the method, the property identifies the parameter name of the method specified by the business object property that accepts the sort expression value.

  The value of the property is stored in view state.

  Gets or sets the name of the data retrieval method parameter that is used to specify a sort expression for data source sorting support.

  2.0.0.0
- Property
  System.String To be added.

  The property must be set to enable paging. For information on how paging is supported by the object, see .

  The value of the property is stored in view state.

  Gets or sets the name of the data retrieval method parameter that is used to indicate the integer index of the first record to retrieve from the results set for data source paging support.

  2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to the interface.

  For a description of this member, see .

- Method
  2.0.0.0
  System.Void ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  An object that represents the state to restore.
- Method
  2.0.0.0
  System.Object

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  The object that contains the changes to the view state; otherwise, null.

- Method
  2.0.0.0
  System.Void

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Method
  System.Void

  The method is primarily used by control developers.

  Causes the object to track changes to its view state so that the changes can be stored in the object for the control and persisted across requests for the same page.

  2.0.0.0
- Property
  System.String To be added.

  To create an instance of the object that the control binds to, the control uses reflection to load the type that is identified by the type name at run time. Therefore, the value of the property can be a partially qualified type for code that is located in the Bin or App_Code directory or a fully qualified type name for code that is registered in the global assembly cache. If you use the global assembly cache, you must add the appropriate reference to the assemblies section of the Machine.config or Web.config configuration file.

  Gets or sets the name of the class that the control represents.

  2.0.0.0
- Method
  System.Int32 `` `` ``

  The default return value is -1, which means that an unknown number of rows were updated. To return a different value, set the property of the object of the event. The number of affected rows is typically returned by the Update method for the business object, and that value is available from the property of the parameter of the event.

  The method calls the method, passing the , , and parameters.

  Performs an update operation by calling the method that is identified by the property and using any parameters that are supplied in the , , or collections.

  The number of rows updated; otherwise, -1, if the number is not known.

  A of the key values used to identify the item to update. These parameters are used with the method specified by the property to perform the update operation. If there are no parameters associated with the method, pass null. A of new values to apply to the data source. These parameters are used with the method specified by the property to perform the update database operation. If there are no parameters associated with the method, pass null. A that contains the additional non-key values used to match the item in the data source. Row values are passed to the delete method, only if the property is set to the field. 2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler

  Handle the event to examine the values of a return value and output parameters or to determine whether an exception was thrown after an operation has completed. The return value, output parameters, and exception handling properties are available from the object that is associated with the event.

  For more information about handling events, see Consuming Events.

  Occurs when an operation has completed.

  2.0.0.0
- Property
  System.String To be added.

  The object assumes that the method that is identified by the property performs updates one at a time, rather than in a batch.

  The method can be an instance method or a static (Shared in Visual Basic) method. If it is an instance method, the business object is created and destroyed each time the method specified by the property is called. You can handle the event to work with the business object before the method specified by the property is called. You can also handle the event that is raised after the method is called. (Dispose is called, only if the business object implements the interface.) If the method is a static (Shared in Visual Basic) method, the business object is never created and you cannot handle these events.

  If the business object that the object works with implements more than one method or function with the same name (method overloads), the data source control attempts to invoke the correct one according to a set of conditions, including the parameters in the collection. If the parameters in the collection do not match those of the signature of the method specified by the property, the data source throws an exception.

  For more information, see .

  The value of the property is stored in view state.

  Gets or sets the name of the method or function that the object invokes to update data.

  2.0.0.0
- Property
  System.Web.UI.WebControls.ParameterCollection To be added.

  The names and types of the parameters that are contained in the collection must match the names and types of the parameters that are in the method specified by the property signature. The parameter names are affected by the property and are case sensitive. When working with data-bound controls that supply parameters, such as and , the control automatically merges any parameters that are explicitly specified in the collection with those parameters that are provided by the data-bound control. For more information, see .

  Gets the parameters collection containing the parameters that are used by the method.

  2.0.0.0
- Event
  System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler

  Handle the event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the control performs the operation. The parameters are available as an collection, accessed by the property, which is exposed by the object.

  For more information about handling events, see Consuming Events.

  Occurs before an operation.

  2.0.0.0