System.Web.UI.WebControls.ObjectDataSource Members

The members of System.Web.UI.WebControls.ObjectDataSource are listed below.

See Also: Inherited members from System.Web.UI.DataSourceControl

Public Constructors

Initializes a new instance of the System.Web.UI.WebControls.ObjectDataSource class.

Initializes a new instance of the System.Web.UI.WebControls.ObjectDataSource class with the specified type name and data retrieval method name.

Public Properties

CacheDurationint.

Gets or sets the length of time, in seconds, that the data source control caches data that is retrieved by the ObjectDataSource.SelectMethod property.

CacheExpirationPolicySystem.Web.UI.DataSourceCacheExpiry.

Gets or sets the cache expiration behavior that, when combined with the duration, describes the behavior of the cache that the data source control uses.

CacheKeyDependencystring.

Gets or sets a user-defined key dependency that is linked to all data cache objects that are created by the data source control.

ConflictDetectionSystem.Web.UI.ConflictOptions.

Gets or sets a value that determines whether or not just the new values are passed to the Update method or both the old and new values are passed to the Update method.

ConvertNullToDBNullbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.Parameter values that are passed to an update, insert, or delete operation are automatically converted from null to the DBNull.Value value by the System.Web.UI.WebControls.ObjectDataSource control.

DataObjectTypeNamestring.

Gets or sets the name of a class that the System.Web.UI.WebControls.ObjectDataSource control uses for a parameter in an update, insert, or delete data operation, instead of passing individual values from the data-bound control.

DeleteMethodstring.

Gets or sets the name of the method or function that the System.Web.UI.WebControls.ObjectDataSource control invokes to delete data.

[read-only]
DeleteParametersParameterCollection.

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

EnableCachingbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.ObjectDataSource control has data caching enabled.

EnablePagingbool.

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

FilterExpressionstring.

Gets or sets a filtering expression that is applied when the method that is specified by the ObjectDataSource.SelectMethod property is called.

[read-only]
FilterParametersParameterCollection.

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

InsertMethodstring.

Gets or sets the name of the method or function that the System.Web.UI.WebControls.ObjectDataSource control invokes to insert data.

[read-only]
InsertParametersParameterCollection.

Gets the parameters collection that contains the parameters that are used by the ObjectDataSource.InsertMethod property.

MaximumRowsParameterNamestring.

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

OldValuesParameterFormatStringstring.

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.

SelectCountMethodstring.

Gets or sets the name of the method or function that the System.Web.UI.WebControls.ObjectDataSource control invokes to retrieve a row count.

SelectMethodstring.

Gets or sets the name of the method or function that the System.Web.UI.WebControls.ObjectDataSource control invokes to retrieve data.

[read-only]
SelectParametersParameterCollection.

Gets a collection of parameters that are used by the method specified by the ObjectDataSource.SelectMethod property.

SortParameterNamestring.

Gets or sets the name of the business object that the ObjectDataSource.SelectMethod parameter used to specify a sort expression for data source sorting support.

SqlCacheDependencystring.

Gets or sets a semicolon-delimited string that indicates which databases and tables to use for the Microsoft SQL Server cache dependency.

StartRowIndexParameterNamestring.

Gets or sets the name of the data retrieval method parameter that is used to indicate the value of the identifier of the first record to retrieve for data source paging support.

TypeNamestring.

Gets or sets the name of the class that the System.Web.UI.WebControls.ObjectDataSource object represents.

UpdateMethodstring.

Gets or sets the name of the method or function that the System.Web.UI.WebControls.ObjectDataSource control invokes to update data.

[read-only]
UpdateParametersParameterCollection.

Gets the parameters collection that contains the parameters that are used by the method that is specified by the ObjectDataSource.UpdateMethod property.

Public Methods

Delete() : int

Performs a delete operation by calling the method that is identified by the ObjectDataSource.DeleteMethod property with any parameters that are in the ObjectDataSource.DeleteParameters collection.

Insert() : int

Performs an insert operation by calling the method that is identified by the ObjectDataSource.InsertMethod property and any parameters in the ObjectDataSource.InsertParameters collection.

Select() : IEnumerable

Retrieves data from the underlying data storage by calling the method that is identified by the ObjectDataSource.SelectMethod property with the parameters in the ObjectDataSource.SelectParameters collection.

Update() : int

Performs an update operation by calling the method that is identified by the ObjectDataSource.UpdateMethod property and any parameters that are in the ObjectDataSource.UpdateParameters collection.

Protected Methods

override
GetView(string) : System.Web.UI.DataSourceView

Retrieves the named data source view that is associated with the data source control.

override
GetViewNames() : ICollection

Retrieves a collection of names representing the list of view objects that are associated with the System.Web.UI.WebControls.ObjectDataSource object.

override
LoadViewState(object)

Loads the previously saved view state of the System.Web.UI.WebControls.ObjectDataSource control.

override
OnInit(EventArgs)

Adds a System.Web.UI.Page.LoadComplete event handler to the page that contains the System.Web.UI.WebControls.ObjectDataSource control.

override
SaveViewState() : object

Saves the state of the System.Web.UI.WebControls.ObjectDataSource control.

override
TrackViewState()

Tracks view-state changes to the System.Web.UI.WebControls.ObjectDataSource control so that they can be stored in the System.Web.UI.StateBag object.

Public Events

Deleted

Occurs when a ObjectDataSource.Delete operation has completed.

Deleting

Occurs before a ObjectDataSource.Delete operation.

Filtering

Occurs before a filter operation.

Inserted

Occurs when an ObjectDataSource.Insert operation has completed.

Inserting

Occurs before an ObjectDataSource.Insert operation.

ObjectCreated

Occurs after the object that is identified by the ObjectDataSource.TypeName property is created.

ObjectCreating

Occurs before the object that is identified by the ObjectDataSource.TypeName property is created.

ObjectDisposing

Occurs before the object that is identified by the ObjectDataSource.TypeName property is discarded.

Selected

Occurs when a ObjectDataSource.Select operation has completed.

Selecting

Occurs before a ObjectDataSource.Select operation.

Updated

Occurs when an ObjectDataSource.Update operation has completed.

Updating

Occurs before an ObjectDataSource.Update operation.