Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
2943 lines (2564 sloc) 274 KB
<Type Name="ObjectDataSourceView" FullName="System.Web.UI.WebControls.ObjectDataSourceView">
<TypeSignature Language="C#" Value="public class ObjectDataSourceView : System.Web.UI.DataSourceView, System.Web.UI.IStateManager" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ObjectDataSourceView extends System.Web.UI.DataSourceView implements class System.Web.UI.IStateManager" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.ObjectDataSourceView" />
<TypeSignature Language="VB.NET" Value="Public Class ObjectDataSourceView&#xA;Inherits DataSourceView&#xA;Implements IStateManager" />
<TypeSignature Language="C++ CLI" Value="public ref class ObjectDataSourceView : System::Web::UI::DataSourceView, System::Web::UI::IStateManager" />
<TypeSignature Language="F#" Value="type ObjectDataSourceView = class&#xA; inherit DataSourceView&#xA; interface IStateManager" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.DataSourceView</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.IStateManager</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Supports the <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control and provides an interface for data-bound controls to perform data operations with business and data objects.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class is intended primarily to be used by data-bound controls, and not as a programmable object in page code.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class implements the data functionality for the <xref:System.Web.UI.WebControls.ObjectDataSource> control, including the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A>, <xref:System.Web.UI.WebControls.ObjectDataSourceView.Update%2A>, <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A>, and <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operations, sorting, filtering, and management of settings kept in view state.
A <xref:System.Web.UI.WebControls.ObjectDataSourceView> object is created for each instance of the <xref:System.Web.UI.WebControls.ObjectDataSource> class at run time. Calls to data operations of the instance of the <xref:System.Web.UI.WebControls.ObjectDataSource> class are handled by the instance of the <xref:System.Web.UI.WebControls.ObjectDataSourceView> object. Page developers do not access the instance of the <xref:System.Web.UI.WebControls.ObjectDataSourceView> class directly. Control developers can create custom data controls by extending the <xref:System.Web.UI.WebControls.ObjectDataSource> and <xref:System.Web.UI.WebControls.ObjectDataSourceView> classes.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class performs data operations by calling methods on business or data objects using reflection. At run time, the <xref:System.Web.UI.WebControls.ObjectDataSource> control creates an instance of the type that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.TypeName%2A> property, and then calls the appropriate method for the data operation. The instantiated object is not cached in memory by the <xref:System.Web.UI.WebControls.ObjectDataSourceView>. 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView> is not directly exposed to page developers by the <xref:System.Web.UI.WebControls.ObjectDataSource> control. Instead, the properties and methods of the <xref:System.Web.UI.WebControls.ObjectDataSourceView> are accessed through the <xref:System.Web.UI.WebControls.ObjectDataSource>. For example, the <xref:System.Web.UI.WebControls.ObjectDataSource.DeleteMethod%2A> of <xref:System.Web.UI.WebControls.ObjectDataSourceView> property is set by setting the <xref:System.Web.UI.WebControls.ObjectDataSource.DeleteMethod%2A> property of the <xref:System.Web.UI.WebControls.ObjectDataSource>.
## Retrieving Data
The most basic operation that a data source view performs is data retrieval from the underlying data storage using the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method, which retrieves an <xref:System.Collections.IEnumerable> collection of data items. The following data retrieval methods, properties, and events are implemented by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> object and exposed directly by its <xref:System.Web.UI.WebControls.ObjectDataSource> control to page developers and other callers:
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Select%2A> method
- The <xref:System.Web.UI.WebControls.ObjectDataSource.SelectMethod%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.SelectParameters%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Selecting> event
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Selected> event
## Updating Data
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> object supports data updates by calling a business or data object method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod%2A> property. Data-bound controls that automatically perform updates, such as the <xref:System.Web.UI.WebControls.GridView> and <xref:System.Web.UI.WebControls.DetailsView> controls, pass their parameters in an <xref:System.Collections.Specialized.IOrderedDictionary> interface to the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and the view object merges these parameters with any parameters that are found in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateParameters%2A> collection.
The following update methods, properties, and events are implemented by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and exposed directly by its <xref:System.Web.UI.WebControls.ObjectDataSource> control to page developers and other callers:
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Update%2A> method
- The <xref:System.Web.UI.WebControls.ObjectDataSource.UpdateMethod%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.UpdateParameters%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Updating> event
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Updated> event
## Inserting Data
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> object supports inserting new rows of data by calling a business or data object method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property. Data-bound controls that automatically perform inserts, such as the <xref:System.Web.UI.WebControls.GridView> and <xref:System.Web.UI.WebControls.DetailsView>, pass their parameters in an <xref:System.Collections.Specialized.IOrderedDictionary> interface to the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and the view object merges these parameters with any parameters that are found in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection.
The following insert methods, properties, and events are implemented by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and exposed directly by its <xref:System.Web.UI.WebControls.ObjectDataSource> control to page developers and other callers:
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Insert%2A> method
- The <xref:System.Web.UI.WebControls.ObjectDataSource.InsertMethod%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.InsertParameters%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Inserting> event
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Inserted> event
## Deleting Data
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> object supports deleting data by calling a business or data object method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property. Data-bound controls that automatically perform deletes, such as the <xref:System.Web.UI.WebControls.GridView> and <xref:System.Web.UI.WebControls.DetailsView>, pass their parameters in an <xref:System.Collections.Specialized.IOrderedDictionary> interface to the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and the view object merges these parameters with any parameters that are found in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. The following delete methods, properties, and events are implemented by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and exposed directly by its <xref:System.Web.UI.WebControls.ObjectDataSource> control to page developers and other callers:
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Delete%2A> method
- The <xref:System.Web.UI.WebControls.ObjectDataSource.DeleteMethod%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.DeleteParameters%2A> property
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Deleting> event
- The <xref:System.Web.UI.WebControls.ObjectDataSource.Deleted> event
## Filtering and Sorting Data
Data retrieval is more powerful when you can filter the data dynamically. Filtering is supported only by the <xref:System.Web.UI.WebControls.ObjectDataSource> control if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method returns a <xref:System.Data.DataTable> or <xref:System.Data.DataSet> object. You can use the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> and <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> properties to apply dynamic filtering to data retrieval. These properties are implemented by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> object and exposed directly by its <xref:System.Web.UI.WebControls.ObjectDataSource> control to data-bound controls and other callers.
You can sort the data that you retrieve with the <xref:System.Web.UI.WebControls.ObjectDataSource> by ordering the data in memory after it is retrieved. Sorting is supported only by the <xref:System.Web.UI.WebControls.ObjectDataSource> control if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method returns a <xref:System.Data.DataTable> or <xref:System.Data.DataSet>. The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanSort%2A> property always returns `true`, because the <xref:System.Web.UI.WebControls.ObjectDataSourceView> cannot determine what type is returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method without calling the method. The <xref:System.Web.UI.DataSourceSelectArguments.SortExpression%2A> property syntax is the same as for a <xref:System.Data.DataView.Sort%2A?displayProperty=nameWithType> property.
## Tracking View State
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> implements the <xref:System.Web.UI.IStateManager> interface and uses view state to track its state across page requests. Implementation of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.LoadViewState%2A>, <xref:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState%2A>, and <xref:System.Web.UI.WebControls.ObjectDataSourceView.TrackViewState%2A> methods are provided to enable view state tracking for the control. For more information, see [ASP.NET State Management Overview](https://msdn.microsoft.com/library/0218d965-5d30-445b-b6a6-8870e70e63ce(v=vs.100)).
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.ObjectDataSource" />
<altmember cref="T:System.Web.UI.DataSourceView" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ObjectDataSourceView (System.Web.UI.WebControls.ObjectDataSource owner, string name, System.Web.HttpContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Web.UI.WebControls.ObjectDataSource owner, string name, class System.Web.HttpContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.#ctor(System.Web.UI.WebControls.ObjectDataSource,System.String,System.Web.HttpContext)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (owner As ObjectDataSource, name As String, context As HttpContext)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; ObjectDataSourceView(System::Web::UI::WebControls::ObjectDataSource ^ owner, System::String ^ name, System::Web::HttpContext ^ context);" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.ObjectDataSourceView : System.Web.UI.WebControls.ObjectDataSource * string * System.Web.HttpContext -&gt; System.Web.UI.WebControls.ObjectDataSourceView" Usage="new System.Web.UI.WebControls.ObjectDataSourceView (owner, name, context)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="owner" Type="System.Web.UI.WebControls.ObjectDataSource" />
<Parameter Name="name" Type="System.String" />
<Parameter Name="context" Type="System.Web.HttpContext" />
</Parameters>
<Docs>
<param name="owner">The <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> is associated with.</param>
<param name="name">A unique name for the data source view, within the scope of the data source control that owns it.</param>
<param name="context">The current <see cref="T:System.Web.HttpContext" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> constructor is called by the <xref:System.Web.UI.WebControls.ObjectDataSource.GetView%2A> method to return a new instance of a data source view with the specified `viewName` parameter. The <xref:System.Web.UI.WebControls.ObjectDataSource> control is associated with only one <xref:System.Web.UI.WebControls.ObjectDataSourceView> at any time, and always names the view `DefaultView`, although this naming restriction is imposed by the <xref:System.Web.UI.WebControls.ObjectDataSource> control, not the <xref:System.Web.UI.WebControls.ObjectDataSourceView>. You can override the <xref:System.Web.UI.WebControls.ObjectDataSource.GetView%2A> method to support views with a different naming convention.
The <xref:System.Web.HttpContext> object that is passed by `context` is used by the data source view to access parameter objects, such as <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> and <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> properties.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSource.GetView(System.String)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSource.GetViewNames" />
</Docs>
</Member>
<Member MemberName="CanDelete">
<MemberSignature Language="C#" Value="public override bool CanDelete { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanDelete" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.CanDelete" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property CanDelete As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanDelete { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanDelete : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.CanDelete" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object that is associated with the current <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control supports the delete operation.</summary>
<value>
<see langword="true" />, if the operation is supported; otherwise, <see langword="false" />. Deletion is not supported, if the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> property is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanDelete%2A> property returns `true`, if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property is set. A delete operation could still fail, if all the data properties are not set or are not set correctly.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Delete(System.Collections.IDictionary,System.Collections.IDictionary)" />
</Docs>
</Member>
<Member MemberName="CanInsert">
<MemberSignature Language="C#" Value="public override bool CanInsert { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanInsert" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.CanInsert" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property CanInsert As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanInsert { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanInsert : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.CanInsert" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object that is associated with the current <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control supports the insert operation.</summary>
<value>
<see langword="true" />, if the operation is supported; otherwise, <see langword="false" />. Insertion is not supported, if the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> property is an empty string.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanInsert%2A> property returns `true`, if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is set. A insert operation could still fail, if all the data properties are not set or are not set correctly.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Insert(System.Collections.IDictionary)" />
</Docs>
</Member>
<Member MemberName="CanPage">
<MemberSignature Language="C#" Value="public override bool CanPage { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanPage" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.CanPage" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property CanPage As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanPage { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanPage : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.CanPage" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object that is associated with the current <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control supports paging through the retrieved data.</summary>
<value>
<see langword="true" />, if the <see cref="P:System.Web.UI.WebControls.ObjectDataSource.EnablePaging" /> value is set to <see langword="true" />; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanPage%2A> property indicates whether the <xref:System.Web.UI.WebControls.ObjectDataSourceView> object supports paging. For information on how paging is supported by the <xref:System.Web.UI.WebControls.ObjectDataSourceView>, see <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A>.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.StartRowIndexParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.MaximumRowsParameterName" />
</Docs>
</Member>
<Member MemberName="CanRetrieveTotalRowCount">
<MemberSignature Language="C#" Value="public override bool CanRetrieveTotalRowCount { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanRetrieveTotalRowCount" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.CanRetrieveTotalRowCount" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property CanRetrieveTotalRowCount As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanRetrieveTotalRowCount { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanRetrieveTotalRowCount : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.CanRetrieveTotalRowCount" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object that is associated with the current <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control supports retrieving the total number of data rows, in addition to the set of data.</summary>
<value>
<see langword="true" />, if the operation is supported; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanRetrieveTotalRowCount%2A> property returns `true`, if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> 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 <xref:System.Web.UI.WebControls.GridView> control pager. For more information on paging support, see <xref:System.Web.UI.WebControls.ObjectDataSource.EnablePaging%2A>.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanRetrieveTotalRowCount%2A> property is checked during a call to the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect%2A> method to ensure that the data source control supports all capabilities requested by setting the various <xref:System.Web.UI.DataSourceSelectArguments> properties.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanPage" />
</Docs>
</Member>
<Member MemberName="CanSort">
<MemberSignature Language="C#" Value="public override bool CanSort { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanSort" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.CanSort" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property CanSort As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanSort { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanSort : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.CanSort" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object that is associated with the current <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control supports a sorted view on the underlying data source.</summary>
<value>
<see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Because the <xref:System.Web.UI.WebControls.ObjectDataSource> control only supports sorting data when the <xref:System.Web.UI.WebControls.ObjectDataSource.Select%2A> method returns a <xref:System.Data.DataSet>, <xref:System.Data.DataView>, or <xref:System.Data.DataTable> object, the view object cannot determine whether sorting is supported until the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method is called and returns. For this reason, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanSort%2A> property always returns `true`.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SortParameterName" />
</Docs>
</Member>
<Member MemberName="CanUpdate">
<MemberSignature Language="C#" Value="public override bool CanUpdate { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanUpdate" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.CanUpdate" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property CanUpdate As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool CanUpdate { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanUpdate : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.CanUpdate" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object that is associated with the current <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control supports the update operation.</summary>
<value>
<see langword="true" />, if the operation is supported; otherwise, <see langword="false" />. Updating is not supported if the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod" /> property is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanUpdate%2A> property returns `true`, if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod%2A> property is set. A update operation could still fail, if all the data properties are not set or are not set correctly.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Update(System.Collections.IDictionary,System.Collections.IDictionary,System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.UpdateMethod" />
</Docs>
</Member>
<Member MemberName="ConflictDetection">
<MemberSignature Language="C#" Value="public System.Web.UI.ConflictOptions ConflictDetection { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.ConflictOptions ConflictDetection" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" />
<MemberSignature Language="VB.NET" Value="Public Property ConflictDetection As ConflictOptions" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::ConflictOptions ConflictDetection { System::Web::UI::ConflictOptions get(); void set(System::Web::UI::ConflictOptions value); };" />
<MemberSignature Language="F#" Value="member this.ConflictDetection : System.Web.UI.ConflictOptions with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.ConflictOptions</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that determines how the <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control performs updates and deletes when data in a row in the underlying data storage changes during the time of the operation.</summary>
<value>One of the <see cref="T:System.Web.UI.ConflictOptions" /> values. The default is the <see cref="F:System.Web.UI.ConflictOptions.OverwriteChanges" /> value.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property returns a <xref:System.Data.DataTable> object with the columns `Name` and `Number`, and the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property is set to the <xref:System.Web.UI.ConflictOptions.OverwriteChanges> value, parameters are created for `Name` and `Number` for the `Update` method. If the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property is set to the <xref:System.Web.UI.ConflictOptions.CompareAllValues> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString%2A>.) The <xref:System.Web.UI.WebControls.ObjectDataSourceView> then determines if the method that is specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property to the <xref:System.Web.UI.ConflictOptions.CompareAllValues> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property is stored in view state.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The selected value is not one of the <see cref="T:System.Web.UI.ConflictOptions" /> values.</exception>
<related type="Article" href="https://msdn.microsoft.com/library/1f10d54b-d7ba-47f4-832b-f83b8861d1d2">ObjectDataSource Control Overview</related>
</Docs>
</Member>
<Member MemberName="ConvertNullToDBNull">
<MemberSignature Language="C#" Value="public bool ConvertNullToDBNull { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ConvertNullToDBNull" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.ConvertNullToDBNull" />
<MemberSignature Language="VB.NET" Value="Public Property ConvertNullToDBNull As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool ConvertNullToDBNull { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.ConvertNullToDBNull : bool with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.ConvertNullToDBNull" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether <see cref="T:System.Web.UI.WebControls.Parameter" /> values that are passed to an update, insert, or delete operation are automatically converted from <see langword="null" /> to the <see cref="F:System.DBNull.Value" /> value.</summary>
<value>
<see langword="true" />, if <see langword="null" /> in <see cref="T:System.Web.UI.WebControls.Parameter" /> objects passed to the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> is automatically converted to the <see cref="F:System.DBNull.Value" /> value; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Not converting `null` to the <xref:System.DBNull.Value?displayProperty=nameWithType> value can result in errors at run time. Use the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConvertNullToDBNull%2A> property to indicate whether the <xref:System.Web.UI.WebControls.Parameter> values that are passed to an update, insert, or a delete operation are automatically converted from `null` to the <xref:System.DBNull.Value?displayProperty=nameWithType> value. For more information, see <xref:System.Web.UI.WebControls.ObjectDataSource.ConvertNullToDBNull?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="F:System.DBNull.Value" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.ConvertNullToDBNull" />
</Docs>
</Member>
<Member MemberName="DataObjectTypeName">
<MemberSignature Language="C#" Value="public string DataObjectTypeName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DataObjectTypeName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.DataObjectTypeName" />
<MemberSignature Language="VB.NET" Value="Public Property DataObjectTypeName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DataObjectTypeName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DataObjectTypeName : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.DataObjectTypeName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of a class that the <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control uses for a parameter in a data operation. The <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> control uses the specified class instead of the <see cref="T:System.Web.UI.WebControls.Parameter" /> objects that are in the various parameters collections.</summary>
<value>A partially or fully qualified class name that identifies the type of the object that the <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> can use as a parameter for a <see cref="M:System.Web.UI.WebControls.ObjectDataSource.Insert" />, <see cref="M:System.Web.UI.WebControls.ObjectDataSource.Update" />, or <see cref="M:System.Web.UI.WebControls.ObjectDataSource.Delete" /> operation. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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 <xref:System.Web.UI.WebControls.ObjectDataSource.DataObjectTypeName?displayProperty=nameWithType>.
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/1f10d54b-d7ba-47f4-832b-f83b8861d1d2">ObjectDataSource Control Overview</related>
</Docs>
</Member>
<Member MemberName="Delete">
<MemberSignature Language="C#" Value="public int Delete (System.Collections.IDictionary keys, System.Collections.IDictionary oldValues);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Delete(class System.Collections.IDictionary keys, class System.Collections.IDictionary oldValues) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.Delete(System.Collections.IDictionary,System.Collections.IDictionary)" />
<MemberSignature Language="VB.NET" Value="Public Function Delete (keys As IDictionary, oldValues As IDictionary) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int Delete(System::Collections::IDictionary ^ keys, System::Collections::IDictionary ^ oldValues);" />
<MemberSignature Language="F#" Value="override this.Delete : System.Collections.IDictionary * System.Collections.IDictionary -&gt; int" Usage="objectDataSourceView.Delete (keys, oldValues)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Collections.IDictionary" />
<Parameter Name="oldValues" Type="System.Collections.IDictionary" />
</Parameters>
<Docs>
<param name="keys">A <see cref="T:System.Collections.IDictionary" /> of the key values used to identify the item to delete. These parameters are used with the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> property to perform the delete operation. If there are no parameters associated with the method, pass <see langword="null" />.</param>
<param name="oldValues">A <see cref="T:System.Collections.IDictionary" /> 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 <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" /> property is set to the <see cref="F:System.Web.UI.ConflictOptions.CompareAllValues" /> field.</param>
<summary>Performs a delete operation by calling the business object method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> property using the specified <paramref name="keys" /> and <paramref name="oldValues" /> collections.</summary>
<returns>The number of rows deleted; otherwise, -1, if the number is not known.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value is -1, which means that an unknown number of rows were deleted. To return a different value, set the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs.AffectedRows%2A> property of the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> object of the <xref:System.Web.UI.WebControls.ObjectDataSource.Deleted> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs.ReturnValue%2A> property of the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> parameter of the <xref:System.Web.UI.WebControls.ObjectDataSource.Deleted> event handler.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> method calls the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete%2A> method, passing the `keys` and `oldValues` collections.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete(System.Collections.IDictionary,System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleted" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleting" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="T:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" />
</Docs>
</Member>
<Member MemberName="Deleted">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler Deleted;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler Deleted" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleted" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Deleted As ObjectDataSourceStatusEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceStatusEventHandler ^ Deleted;" />
<MemberSignature Language="F#" Value="member this.Deleted : System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler " Usage="member this.Deleted : System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" /> operation has completed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleted> event to examine the values of a return value and output parameters or to determine whether an exception was thrown after a <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation has completed. The return value, output parameters, and exception handling properties are available from the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> object that is associated with the event.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.GridView> control to delete data. The <xref:System.Web.UI.WebControls.GridView> initially displays a set of all employees, using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSource.SelectMethod%2A> property to retrieve the data from the `EmployeeLogic` object. Because the <xref:System.Web.UI.WebControls.GridView.AutoGenerateDeleteButton%2A> property is set to `true`, the <xref:System.Web.UI.WebControls.GridView> control automatically displays a **Delete** button.
If you click the **Delete** button, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property and any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. In this code example, some preprocessing and post-processing steps are also performed. The `NorthwindEmployeeDeleting` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleting> event before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed, and the `NorthwindEmployeeDeleted` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleted> event after the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation has completed, to perform an exception handling. In this example, if a `NorthwindDataException` is thrown, it is handled by this delegate.
To examine the implementation of the `EmployeeLogic` middle-tier business object that this code example uses, see <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs>.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/CS/objds10cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/VB/objds10vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleting" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
</Docs>
</Member>
<Member MemberName="DeleteMethod">
<MemberSignature Language="C#" Value="public string DeleteMethod { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DeleteMethod" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" />
<MemberSignature Language="VB.NET" Value="Public Property DeleteMethod As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DeleteMethod { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DeleteMethod : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object invokes to delete data.</summary>
<value>A string that represents the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> uses to delete data. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property is called. You can handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated> event to work with the business object before the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property is called. You can also handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> event that is raised after the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. If the parameters in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection do not match those of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> method signature, the data source throws an exception.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property is stored in view state.
For more information, see <xref:System.Web.UI.WebControls.ObjectDataSource.DeleteMethod%2A>.
## Examples
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.GridView> control to delete data. The <xref:System.Web.UI.WebControls.GridView> initially displays a set of all employees, using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSource.SelectMethod%2A> property to retrieve the data from the `EmployeeLogic` object. Because the <xref:System.Web.UI.WebControls.GridView.AutoGenerateDeleteButton%2A> property is set to `true`, the <xref:System.Web.UI.WebControls.GridView> control automatically displays a **Delete** button.
If you click the **Delete** button, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property and any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. In this code example, some preprocessing and post-processing steps are also performed. The `NorthwindEmployeeDeleting` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSource.Deleting> event before the <xref:System.Web.UI.WebControls.ObjectDataSource.Delete%2A> operation is performed, and the `NorthwindEmployeeDeleted` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSource.Deleted> event after the <xref:System.Web.UI.WebControls.ObjectDataSource.Delete%2A> operation has completed, to perform an exception handling. In this example, if a `NorthwindDataException` is thrown, it is handled by this delegate.
To examine the implementation of the `EmployeeLogic` middle-tier business object that this code example uses, see <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs>.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/CS/objds10cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/VB/objds10vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Delete(System.Collections.IDictionary,System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
</Docs>
</Member>
<Member MemberName="DeleteParameters">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ParameterCollection DeleteParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.ParameterCollection DeleteParameters" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DeleteParameters As ParameterCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::ParameterCollection ^ DeleteParameters { System::Web::UI::WebControls::ParameterCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DeleteParameters : System.Web.UI.WebControls.ParameterCollection" Usage="System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ParameterCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the parameters collection that contains the parameters that are used by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> method.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.ParameterCollection" /> that contains the parameters used by the method specified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The names and types of the parameters that are contained in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection must match the names and types of the parameters that are in the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property signature. The parameter names are affected by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString%2A> property and are case sensitive. When working with data-bound controls that supply parameters, such as <xref:System.Web.UI.WebControls.GridView> and <xref:System.Web.UI.WebControls.DetailsView>, the <xref:System.Web.UI.WebControls.ObjectDataSource> 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 <xref:System.Web.UI.WebControls.ObjectDataSource.DeleteMethod%2A>.
]]></format>
</remarks>
<altmember cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.DeleteParameters" />
</Docs>
</Member>
<Member MemberName="Deleting">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler Deleting;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler Deleting" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleting" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Deleting As ObjectDataSourceMethodEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceMethodEventHandler ^ Deleting;" />
<MemberSignature Language="F#" Value="member this.Deleting : System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler " Usage="member this.Deleting : System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before a <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" /> operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleting> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> control performs the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation. The parameters are available as an <xref:System.Collections.IDictionary> collection that is accessed by the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs.InputParameters%2A> property, which is exposed by the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs> object.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.GridView> control to delete data. The <xref:System.Web.UI.WebControls.GridView> initially displays a set of all employees, using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property to retrieve the data from the `EmployeeLogic` object. Because the <xref:System.Web.UI.WebControls.GridView.AutoGenerateDeleteButton%2A> property is set to `true`, the <xref:System.Web.UI.WebControls.GridView> control automatically displays a **Delete** button.
If you click the **Delete** button, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property and any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. In this code example, some preprocessing and post-processing steps are also performed. The `NorthwindEmployeeDeleting` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleting> event before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed, and the `NorthwindEmployeeDeleted` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleted> event after the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation has completed, to perform an exception handling. In this example, if a `NorthwindDataException` is thrown, it is handled by this delegate.
To examine the implementation of the `EmployeeLogic` middle-tier business object that this code example uses, see <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs>.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/CS/objds10cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/VB/objds10vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleted" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
</Docs>
</Member>
<Member MemberName="EnablePaging">
<MemberSignature Language="C#" Value="public bool EnablePaging { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnablePaging" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" />
<MemberSignature Language="VB.NET" Value="Public Property EnablePaging As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool EnablePaging { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.EnablePaging : bool with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the data source control supports paging through the set of data that it retrieves.</summary>
<value>
<see langword="true" />, if the data source control supports paging through the data it retrieves; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Paging by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> control is handled by setting the <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A>, <xref:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName%2A>, <xref:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName%2A>, and <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> properties of the <xref:System.Web.UI.WebControls.ObjectDataSourceView> and defining a `Select` method in the business object with the proper parameters. When the <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A> property is set to `true`, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName%2A> and <xref:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.CanRetrieveTotalRowCount%2A> property is checked during a call to the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect%2A> method to ensure that the data source control supports all capabilities requested by setting the various <xref:System.Web.UI.DataSourceSelectArguments> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> property is set, the data-bound control calls the method before rendering the pager controls. For example, if a <xref:System.Web.UI.WebControls.GridView> control has paging enabled with a page size of 5, and the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> method returns 20, only 4 pages are displayed in the pager.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A> property is stored in view state.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanPage" />
</Docs>
</Member>
<Member MemberName="ExecuteDelete">
<MemberSignature Language="C#" Value="protected override int ExecuteDelete (System.Collections.IDictionary keys, System.Collections.IDictionary oldValues);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance int32 ExecuteDelete(class System.Collections.IDictionary keys, class System.Collections.IDictionary oldValues) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete(System.Collections.IDictionary,System.Collections.IDictionary)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function ExecuteDelete (keys As IDictionary, oldValues As IDictionary) As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override int ExecuteDelete(System::Collections::IDictionary ^ keys, System::Collections::IDictionary ^ oldValues);" />
<MemberSignature Language="F#" Value="override this.ExecuteDelete : System.Collections.IDictionary * System.Collections.IDictionary -&gt; int" Usage="objectDataSourceView.ExecuteDelete (keys, oldValues)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Collections.IDictionary" />
<Parameter Name="oldValues" Type="System.Collections.IDictionary" />
</Parameters>
<Docs>
<param name="keys">A <see cref="T:System.Collections.IDictionary" /> of parameters used with the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> property to perform the delete operation. If there are no parameters associated with the method, pass <see langword="null" />.</param>
<param name="oldValues">A <see cref="T:System.Collections.IDictionary" /> that contains row values that are evaluated, only if the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" /> property is set to the <see cref="F:System.Web.UI.ConflictOptions.CompareAllValues" /> field.</param>
<summary>Performs a delete operation using the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" /> method and the specified <paramref name="keys" /> and <paramref name="oldValues" /> collection.</summary>
<returns>The number of rows deleted; otherwise, -1, if the number is not known. For more information, see <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class implements the inherited <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete%2A> method to delete data from an underlying data store using a business object. Page developers and data-bound control authors do not call the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete%2A> method directly; instead, use the publicly exposed <xref:System.Web.UI.WebControls.ObjectDataSource.Delete%2A> method.
Before the delete operation is performed, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleting> event. You can handle this event to examine the values of the parameters and perform any preprocessing before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> method is called.
To perform a delete operation, the <xref:System.Web.UI.WebControls.ObjectDataSourceView> uses reflection to call the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property and any associated parameters in the `keys` and `oldValues` collections, and then executes it. After the operation completes, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleted> event. You can handle this event to examine any return values and error codes, and to perform any post-processing.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanDelete" /> property returns <see langword="false" />.</exception>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" /> property is set to the <see cref="F:System.Web.UI.ConflictOptions.CompareAllValues" /> value, and no values are passed in the <paramref name="oldValues" /> collection.</exception>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Delete(System.Collections.IDictionary,System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleted" />
</Docs>
</Member>
<Member MemberName="ExecuteInsert">
<MemberSignature Language="C#" Value="protected override int ExecuteInsert (System.Collections.IDictionary values);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance int32 ExecuteInsert(class System.Collections.IDictionary values) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert(System.Collections.IDictionary)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function ExecuteInsert (values As IDictionary) As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override int ExecuteInsert(System::Collections::IDictionary ^ values);" />
<MemberSignature Language="F#" Value="override this.ExecuteInsert : System.Collections.IDictionary -&gt; int" Usage="objectDataSourceView.ExecuteInsert values" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="values" Type="System.Collections.IDictionary" />
</Parameters>
<Docs>
<param name="values">A <see cref="T:System.Collections.IDictionary" /> of parameters used with the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> property to perform the insert operation. If there are no parameters associated with the method, pass <see langword="null" />.</param>
<summary>Performs an insert operation by calling the business object method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> property using the specified <paramref name="values" /> collection.</summary>
<returns>The number of rows inserted; otherwise, -1, if the number is not known. For more information, see <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Insert" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class implements the inherited <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert%2A> method to insert data into an underlying data store using a business object. Page developers and data-bound control authors do not call the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert%2A> method directly; instead, use the publicly exposed <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> method.
Before the insert is performed, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Inserting> event. You can handle this event to examine the values of the parameters and perform any preprocessing before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> method is called.
To perform an insert operation, the <xref:System.Web.UI.WebControls.ObjectDataSourceView> control uses reflection to call the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property and any associated parameters that are in the `values` collection, and then executes it. After the operation completes, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Inserted> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A>.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanInsert" /> property returns <see langword="false" />.</exception>
<exception cref="T:System.InvalidOperationException">
<paramref name="values" /> is <see langword="null" /> or empty.</exception>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Insert(System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserted" />
</Docs>
</Member>
<Member MemberName="ExecuteSelect">
<MemberSignature Language="C#" Value="protected internal override System.Collections.IEnumerable ExecuteSelect (System.Web.UI.DataSourceSelectArguments arguments);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance class System.Collections.IEnumerable ExecuteSelect(class System.Web.UI.DataSourceSelectArguments arguments) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides Function ExecuteSelect (arguments As DataSourceSelectArguments) As IEnumerable" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; override System::Collections::IEnumerable ^ ExecuteSelect(System::Web::UI::DataSourceSelectArguments ^ arguments);" />
<MemberSignature Language="F#" Value="override this.ExecuteSelect : System.Web.UI.DataSourceSelectArguments -&gt; System.Collections.IEnumerable" Usage="objectDataSourceView.ExecuteSelect arguments" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerable</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arguments" Type="System.Web.UI.DataSourceSelectArguments" />
</Parameters>
<Docs>
<param name="arguments">A <see cref="T:System.Web.UI.DataSourceSelectArguments" /> used to request operations on the data beyond basic data retrieval.</param>
<summary>Retrieves data from the object that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" /> property by calling the method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" /> property and passing any values in the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" /> collection.</summary>
<returns>A <see cref="T:System.Collections.IEnumerable" /> list of data rows.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class implements the inherited <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect%2A> method to retrieve data using a business object. Page developers and data-bound control authors do not call the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect%2A> method directly; instead, use the publicly exposed <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.
The specified method can have any method signature, but must return one of the types for the <xref:System.Web.UI.WebControls.ObjectDataSource> control that are listed in the following table to call it successfully.
|Return type|Action|
|-----------------|------------|
|<xref:System.Collections.IEnumerable>|The <xref:System.Collections.IEnumerable> is returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
|<xref:System.Data.DataTable>|A <xref:System.Data.DataView> is created using the <xref:System.Data.DataTable> and returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
|<xref:System.Data.DataSet>|The first <xref:System.Data.DataTable> of the <xref:System.Data.DataSet> is extracted and a <xref:System.Data.DataView> is created and returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
|<xref:System.Object>|The object is wrapped in a one-element <xref:System.Collections.IEnumerable> and returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
Before the data retrieval is performed, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Selecting> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView> control uses reflection to call the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property and any associated parameters that are in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> collection, and then executes it. After the operation completes, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Selected> event. You can handle this event to examine any return values and error codes, and to perform any post-processing.
If the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method returns a <xref:System.Data.DataSet> object and caching is enabled, the <xref:System.Web.UI.WebControls.ObjectDataSourceView> 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 <xref:System.Web.UI.WebControls.ObjectDataSource.CacheDuration%2A> and <xref:System.Web.UI.WebControls.ObjectDataSource.CacheExpirationPolicy%2A> properties.
If the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method returns a <xref:System.Data.DataSet> object and a <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> property has been specified, it is evaluated along with any supplied <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> properties and the resulting filter is applied to the list of data during the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> operation.
For information on returning the number of rows selected, see <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A>.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <paramref name="arguments" /> passed to the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments)" /> method specify that the data source should perform some additional work while retrieving data to enable paging or sorting through the retrieved data, but the data source control does not support the requested capability.
-or-
The object returned by the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments)" /> method is not a <see cref="T:System.Data.DataSet" /> or <see cref="T:System.Data.DataTable" />, and caching is enabled. Only <see cref="T:System.Data.DataSet" /> and <see cref="T:System.Data.DataTable" /> objects can be cached for the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> control.
-or-
Both caching and client impersonation are enabled. The <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> does not support caching when client impersonation is enabled.</exception>
<exception cref="T:System.InvalidOperationException">The object returned by the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments)" /> method is a <see cref="T:System.Data.DataSet" />, but has no tables in its <see cref="P:System.Data.DataSet.Tables" /> collection.
-or-
The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" /> property is set to <see langword="true" />, but the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName" /> and <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName" /> properties are not set.</exception>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting(System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Selecting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Selected" />
</Docs>
</Member>
<Member MemberName="ExecuteUpdate">
<MemberSignature Language="C#" Value="protected override int ExecuteUpdate (System.Collections.IDictionary keys, System.Collections.IDictionary values, System.Collections.IDictionary oldValues);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance int32 ExecuteUpdate(class System.Collections.IDictionary keys, class System.Collections.IDictionary values, class System.Collections.IDictionary oldValues) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(System.Collections.IDictionary,System.Collections.IDictionary,System.Collections.IDictionary)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function ExecuteUpdate (keys As IDictionary, values As IDictionary, oldValues As IDictionary) As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override int ExecuteUpdate(System::Collections::IDictionary ^ keys, System::Collections::IDictionary ^ values, System::Collections::IDictionary ^ oldValues);" />
<MemberSignature Language="F#" Value="override this.ExecuteUpdate : System.Collections.IDictionary * System.Collections.IDictionary * System.Collections.IDictionary -&gt; int" Usage="objectDataSourceView.ExecuteUpdate (keys, values, oldValues)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Collections.IDictionary" />
<Parameter Name="values" Type="System.Collections.IDictionary" />
<Parameter Name="oldValues" Type="System.Collections.IDictionary" />
</Parameters>
<Docs>
<param name="keys">A <see cref="T:System.Collections.IDictionary" /> of primary keys to use with the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod" /> property to perform the update database operation. If there are no keys associated with the method, pass <see langword="null" />.</param>
<param name="values">A <see cref="T:System.Collections.IDictionary" /> of values to be used with the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod" /> to perform the update database operation. If there are no parameters associated with the method, pass <see langword="null" />.</param>
<param name="oldValues">A <see cref="T:System.Collections.IDictionary" /> that represents the original values in the underlying data store. If there are no parameters associated with the query, pass <see langword="null" />.</param>
<summary>Performs an update operation by calling the method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod" /> property and using any parameters that are supplied in the <paramref name="keys" />, <paramref name="values" />, or <paramref name="oldValues" /> collections.</summary>
<returns>The number of rows updated; or -1, if the number is not known. For more information, see <see cref="M:System.Web.UI.WebControls.ObjectDataSource.Update" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView> class implements the inherited <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate%2A> method to update data using a business object. Page developers and data-bound control authors do not call the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate%2A> method directly; instead, use the publicly exposed <xref:System.Web.UI.WebControls.ObjectDataSource.Update%2A> method.
The values that are contained in the `keys` and `values` collections are evaluated and merged with any values that are contained by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateParameters%2A> collection. If the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property is set to the <xref:System.Web.UI.ConflictOptions.CompareAllValues> value, the values that are contained in the `oldValues` collection are formatted with the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString%2A> property and are also merged.
Before the update operation is performed, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdating%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Updating> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView> uses reflection to call the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod%2A> property and any associated parameters in the `keys` collection, and then executes it. After the operation completes, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdated%2A> method is called to raise the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Updated> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.Update%2A>.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanInsert" /> property returns <see langword="false" />.</exception>
<exception cref="T:System.InvalidOperationException">
<paramref name="oldValues" /> is <see langword="null" /> or empty and <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" /> is set to <see cref="F:System.Web.UI.ConflictOptions.CompareAllValues" />.</exception>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Update(System.Collections.IDictionary,System.Collections.IDictionary,System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.UpdateParameters" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdating(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdated(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Updating" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Updated" />
</Docs>
</Member>
<Member MemberName="FilterExpression">
<MemberSignature Language="C#" Value="public string FilterExpression { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string FilterExpression" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" />
<MemberSignature Language="VB.NET" Value="Public Property FilterExpression As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ FilterExpression { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.FilterExpression : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a filtering expression that is applied when the business object method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" /> property is called.</summary>
<value>A string that represents a filtering expression applied when data is retrieved using the business object method identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSource> control supports filtering data only when the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method returns a <xref:System.Data.DataSet>, <xref:System.Data.DataView>, or <xref:System.Data.DataTable> object.
The syntax that is used for the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterExpression%2A> property is a format string-style expression. The filter expression syntax is the same syntax that is accepted by the <xref:System.Data.DataView.RowFilter%2A> property because the filter expression is applied to the <xref:System.Data.DataView.RowFilter%2A> property of the <xref:System.Data.DataView> object that is returned from executing the <xref:System.Web.UI.WebControls.ObjectDataSource.Select%2A> method. (For more information, see <xref:System.Data.DataColumn.Expression%2A>.) If you add parameters to the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterParameters%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSource.FilterParameters%2A> collection.
You can include parameters in the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterExpression%2A>. 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 <xref:System.Web.UI.WebControls.ObjectDataSource.FilterParameters%2A> collection contains the parameters that are evaluated for the placeholders found in the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterExpression%2A>.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> property is stored in view state.
> [!IMPORTANT]
> 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 <xref:System.Data.DataView> object that is returned by the <xref:System.Web.UI.WebControls.ObjectDataSource.Select%2A> method. If you are using the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterExpression%2A> property as a security measure to limit the number of items that are returned, you must validate the parameter values before the filtering occurs.
## Examples
This section contains two code examples. The first code example demonstrates how to display filtered data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control to retrieve data from a middle-tier business object and a <xref:System.Web.UI.WebControls.GridView> control to display the results. The second code example provides an example of the middle-tier business object that is used in the first code example.
The following code example demonstrates how to display filtered data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control to retrieve data from a middle-tier business object and a <xref:System.Web.UI.WebControls.GridView> control to display the results. The <xref:System.Web.UI.WebControls.ObjectDataSource> control can filter data only when the method that retrieves the data retrieves it as a <xref:System.Data.DataSet> object. For this reason, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property identifies a business object method that retrieves data as a <xref:System.Data.DataSet>.
The code example consists of a <xref:System.Web.UI.WebControls.TextBox>, a <xref:System.Web.UI.WebControls.GridView> control, the <xref:System.Web.UI.WebControls.ObjectDataSource> control, and a **Submit** button. By default, the <xref:System.Web.UI.WebControls.TextBox> is populated with the name of one of the Northwind Traders employees. The <xref:System.Web.UI.WebControls.GridView> displays information about the employee that is identified by the name in the <xref:System.Web.UI.WebControls.TextBox>. To retrieve data on another employee, in the <xref:System.Web.UI.WebControls.TextBox>, enter the full name of the employee, and then click the **Submit** button.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> property specifies an expression that is used to filter the data that is retrieved by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property. It uses parameter placeholders that are evaluated to the parameters that are contained in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> collection. In this example, the parameter placeholder is bounded by single quotation marks because the type of the parameter is a string type that might contain spaces. If the type of the parameter is a numeric or date type, bounding quotation marks are not required.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_9#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/CS/objds9cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_9#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/VB/objds9vb.aspx#1)]
The following code example provides an example of a middle-tier business object that the preceding code example uses. The code example consists of two basic classes:
- The `EmployeeLogic` class, which is a class that encapsulates business logic.
- The `NorthwindEmployee` class, which is a model class that contains only the basic functionality that is required to load and persist data from the data tier.
For simplicity, the `EmployeeLogic` class creates a static set of data, rather than retrieving the data from a data tier. It is also helpful for this example, because the sample relies on you to provide the full name of a Northwind Traders employee to demonstrate filtering.
For a complete working example, you must compile and use these classes with the Web Forms page code examples that are provided.
[!code-csharp[System.Web.UI.WebControls.ObjectDataSource_9#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/CS/northwindemployee9.cs#2)]
[!code-vb[System.Web.UI.WebControls.ObjectDataSource_9#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/VB/northwindemployee9.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" /> property was set and the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" /> method does not return a <see cref="T:System.Data.DataSet" />.</exception>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters" />
</Docs>
</Member>
<Member MemberName="Filtering">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceFilteringEventHandler Filtering;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceFilteringEventHandler Filtering" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Filtering" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Filtering As ObjectDataSourceFilteringEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceFilteringEventHandler ^ Filtering;" />
<MemberSignature Language="F#" Value="member this.Filtering : System.Web.UI.WebControls.ObjectDataSourceFilteringEventHandler " Usage="member this.Filtering : System.Web.UI.WebControls.ObjectDataSourceFilteringEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceFilteringEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before a filter operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSource.Filtering> event to perform validation operations on filter parameter values before the <xref:System.Web.UI.WebControls.ObjectDataSource> control performs a filter operation. You can cancel the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> operation by setting the <xref:System.ComponentModel.CancelEventArgs.Cancel%2A> property of the <xref:System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs> object to `true`. The event is raised, only if the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterExpression%2A> property is set.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
> [!IMPORTANT]
> 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 <xref:System.Data.DataView> object that is returned by the <xref:System.Web.UI.WebControls.ObjectDataSource.Select%2A> method. If you are using the <xref:System.Web.UI.WebControls.ObjectDataSource.FilterExpression%2A> property as a security measure to limit the number of items that are returned, you must validate the parameter values before the filtering occurs.
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Filtering" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.FilterExpression" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.FilterParameters" />
</Docs>
</Member>
<Member MemberName="FilterParameters">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ParameterCollection FilterParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.ParameterCollection FilterParameters" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property FilterParameters As ParameterCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::ParameterCollection ^ FilterParameters { System::Web::UI::WebControls::ParameterCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.FilterParameters : System.Web.UI.WebControls.ParameterCollection" Usage="System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ParameterCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of parameters that are associated with any parameter placeholders that are in the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" /> string.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.ParameterCollection" /> that contains a set of parameters associated with any parameter placeholders found in the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSource> control supports filtering data only when the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method returns a <xref:System.Data.DataSet>, <xref:System.Data.DataTable>, or <xref:System.Data.DataView> object.
The parameters in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> collection are associated with any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> property. The parameter placeholders that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> property are matched to parameter objects in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> collection when the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property is called.
## Examples
This section contains two code examples. The first code example demonstrates how to display filtered data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control to retrieve data from a middle-tier business object and a <xref:System.Web.UI.WebControls.GridView> control to display the results. The second code example provides an example of the middle-tier business object that is used in the first code example.
The following code example demonstrates how to display filtered data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control to retrieve data from a middle-tier business object and a <xref:System.Web.UI.WebControls.GridView> control to display the results. The <xref:System.Web.UI.WebControls.ObjectDataSource> control can filter data only when the method that retrieves the data retrieves it as a <xref:System.Data.DataSet> object. For this reason, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property identifies a business object method that retrieves data as a <xref:System.Data.DataSet>.
The code example consists of a <xref:System.Web.UI.WebControls.TextBox>, a <xref:System.Web.UI.WebControls.GridView> control, the <xref:System.Web.UI.WebControls.ObjectDataSource> control, and a **Submit** button. By default, the <xref:System.Web.UI.WebControls.TextBox> is populated with the name of one of the Northwind Traders employees. The <xref:System.Web.UI.WebControls.GridView> displays information about the employee that is identified by the name in the <xref:System.Web.UI.WebControls.TextBox>. To retrieve data on another employee, in the <xref:System.Web.UI.WebControls.TextBox>, enter the full name of the employee, and then click the **Submit** button.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression%2A> property specifies an expression that is used to filter the data that is retrieved by the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property. It uses parameter placeholders that are evaluated to the parameters that are contained in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> collection. In this example, the parameter placeholder is bounded by single quotation marks because the type of the parameter is a string type that might contain spaces. If the type of the parameter is a numeric or date type, bounding quotation marks are not required. The <xref:System.Web.UI.WebControls.ObjectDataSourceView.FilterParameters%2A> collection contains one parameter, a <xref:System.Web.UI.WebControls.FormParameter> that is bound to the <xref:System.Web.UI.WebControls.TextBox> control.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_9#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/CS/objds9cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_9#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/VB/objds9vb.aspx#1)]
The following code example provides an example of a middle-tier business object that the preceding code example uses. The code example consists of two basic classes:
- The `EmployeeLogic` class, which is a class that encapsulates business logic.
- The `NorthwindEmployee` class, which is a model class that contains only the basic functionality that is required to load and persist data from the data tier.
For simplicity, the `EmployeeLogic` class creates a static set of data, rather than retrieving the data from a data tier. It is also helpful for this example, because the sample relies on you to provide the full name of a Northwind Traders employee to demonstrate filtering.
For a complete working example, you must compile and use these classes with the Web Forms page code examples that are provided.
[!code-csharp[System.Web.UI.WebControls.ObjectDataSource_9#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/CS/northwindemployee9.cs#2)]
[!code-vb[System.Web.UI.WebControls.ObjectDataSource_9#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_9/VB/northwindemployee9.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" /> property was set and the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" /> method does not return a <see cref="T:System.Data.DataSet" />.</exception>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.FilterExpression" />
</Docs>
</Member>
<Member MemberName="Insert">
<MemberSignature Language="C#" Value="public int Insert (System.Collections.IDictionary values);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Insert(class System.Collections.IDictionary values) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.Insert(System.Collections.IDictionary)" />
<MemberSignature Language="VB.NET" Value="Public Function Insert (values As IDictionary) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int Insert(System::Collections::IDictionary ^ values);" />
<MemberSignature Language="F#" Value="override this.Insert : System.Collections.IDictionary -&gt; int" Usage="objectDataSourceView.Insert values" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="values" Type="System.Collections.IDictionary" />
</Parameters>
<Docs>
<param name="values">A <see cref="T:System.Collections.IDictionary" /> collection of parameters used with the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> property to perform the insert operation. If there are no parameters associated with the method, pass <see langword="null" />.</param>
<summary>Performs an insert operation by calling the business object method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> property using the specified <paramref name="values" /> collection.</summary>
<returns>The number of rows inserted; otherwise, -1, if the number is not known.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default return value is -1, which means that an unknown number of rows were inserted. To return a different value, set the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs.AffectedRows%2A> property of the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> object of the <xref:System.Web.UI.WebControls.ObjectDataSource.Inserted> event. The number of affected rows is typically returned by the `Insert` method for the business object, and that value is available from the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs.ReturnValue%2A> property of the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> object of the <xref:System.Web.UI.WebControls.ObjectDataSource.Inserted> event.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> method calls the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert%2A> method, passing the `values` collection.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanInsert" /> property returns <see langword="false" />.</exception>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert(System.Collections.IDictionary)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserted" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
</Docs>
</Member>
<Member MemberName="Inserted">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler Inserted;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler Inserted" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserted" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Inserted As ObjectDataSourceStatusEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceStatusEventHandler ^ Inserted;" />
<MemberSignature Language="F#" Value="member this.Inserted : System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler " Usage="member this.Inserted : System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when an <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Insert" /> operation has completed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Inserted> event to examine the values of a return value and output parameters or to determine whether an exception was thrown after an <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation has completed. The return value, output parameters, and exception handling properties are available from the <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> object that is associated with the event.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserting" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Insert" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
</Docs>
</Member>
<Member MemberName="Inserting">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler Inserting;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler Inserting" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserting" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Inserting As ObjectDataSourceMethodEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceMethodEventHandler ^ Inserting;" />
<MemberSignature Language="F#" Value="member this.Inserting : System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler " Usage="member this.Inserting : System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before an <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Insert" /> operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Inserting> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> control performs the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation. The parameters are available as an <xref:System.Collections.IDictionary> collection that is accessed by the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs.InputParameters%2A> property, which is exposed by the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs> object.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
This section contains two code examples. The first code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.DetailsView> control to insert data. The second code example provides an example of the middle-tier business object that is used in the first code example.
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.DetailsView> control to insert data. The <xref:System.Web.UI.WebControls.DetailsView> initially displays a new `NorthwindEmployee` record, along with an automatically generated **Insert** button. After you enter data into the fields of the <xref:System.Web.UI.WebControls.DetailsView> control, click the **Insert** button. The <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property identifies which method performs the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation.
In this code example, the `UpdateEmployeeInfo` method is used to perform an insert; however it requires a `NorthwindEmployee` parameter to insert the data. For this reason, the collection of strings that the <xref:System.Web.UI.WebControls.DetailsView> control passes automatically is not sufficient. The `NorthwindEmployeeInserting` delegate is an <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler> object that handles the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Inserting> event and enables you to manipulate the input parameters before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation proceeds. Because the `UpdateEmployeeInfo` method requires a `NorthwindEmployee` object as a parameter, one is created using the collection of strings, and then added to the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs.InputParameters%2A> collection using a parameter name (`ne`) that the method expects. You might perform steps like these when using an existing middle-tier object as a data source with types and methods that are not designed specifically for use with the <xref:System.Web.UI.WebControls.ObjectDataSource> control.
When the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation is performed, the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is called. If the `Insert` method of the object has a method signature that includes parameters, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection must contain a parameter with names that match the method signature parameters for the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> method to complete successfully.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_4#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/CS/objds4cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_4#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/VB/objds4vb.aspx#1)]
The following code example provides an example of a middle-tier business object that the preceding code example uses. The code example consists of two basic classes:
- The `EmployeeLogic` class, which is a stateless class that encapsulates business logic.
- The `NorthwindEmployee` class, which is a model class that contains only the basic functionality that is required to load and persist data from the data tier.
An additional `NorthwindDataException` class is provided as a convenience.
For a complete working example, you must compile and use these classes. The `UpdateEmployeeInfo` method is not completely implemented, so you will not insert data into the Northwind Traders database when you experiment with this example.
[!code-csharp[System.Web.UI.WebControls.ObjectDataSource_4#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/CS/northwindemployee4.cs#2)]
[!code-vb[System.Web.UI.WebControls.ObjectDataSource_4#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/VB/northwindemployee4.vb#2)]
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserted" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<altmember cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Insert" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
</Docs>
</Member>
<Member MemberName="InsertMethod">
<MemberSignature Language="C#" Value="public string InsertMethod { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string InsertMethod" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" />
<MemberSignature Language="VB.NET" Value="Public Property InsertMethod As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ InsertMethod { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.InsertMethod : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object invokes to insert data.</summary>
<value>A string that represents the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> uses to insert data. The default value is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is called. You can handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated> event to work with the business object before the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is called. You can also handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> event that is raised after the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is called. (`Dispose` is called, only if the business object implements the <xref:System.IDisposable> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection. If the parameters in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection do not match those of the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property signature, the data source throws an exception.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is stored in view state.
For more information, see <xref:System.Web.UI.WebControls.ObjectDataSource.InsertMethod%2A>.
## Examples
This section contains two code examples. The first code example demonstrates how to display filtered data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.DetailsView> control to insert data. The second code example provides an example of the middle-tier business object that is used in the first code example.
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.DetailsView> control to insert data. The <xref:System.Web.UI.WebControls.DetailsView> initially displays a new `NorthwindEmployee` record, along with an automatically generated **Insert** button. After you enter data into the fields of the <xref:System.Web.UI.WebControls.DetailsView> control, click the **Insert** button. The <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property identifies which method performs the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation.
In this code example, the `UpdateEmployeeInfo` method is used to perform an insert; however, it requires a `NorthwindEmployee` parameter to insert the data. For this reason, the collection of strings that the <xref:System.Web.UI.WebControls.DetailsView> control passes automatically is not sufficient. The `NorthwindEmployeeInserting` delegate is an <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventHandler> object that handles the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Inserting> event and enables you to manipulate the input parameters before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation proceeds. Because the `UpdateEmployeeInfo` method requires a `NorthwindEmployee` object as a parameter, one is created using the collection of strings and is added to the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs.InputParameters%2A> collection using a parameter name (`ne`) that the method expects. You might perform steps like these when using an existing middle-tier object as a data source with types and methods that are not designed specifically for use with the <xref:System.Web.UI.WebControls.ObjectDataSource> control.
When the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation is performed, the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is called. If the `Insert` method of the object has a method signature that includes parameters, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection must contain a parameter with names that match the method signature parameters for the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> method to complete successfully.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_4#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/CS/objds4cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_4#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/VB/objds4vb.aspx#1)]
The following code example provides an example of a middle-tier business object that the previous code example uses. The code example consists of two basic classes and an additional class:
- The `EmployeeLogic` class is a stateless class, which encapsulates business logic.
- The `NorthwindEmployee` class is a model class, which contains only the basic functionality that is required to load and persist data from the data tier.
- An additional `NorthwindDataException` class is provided as a convenience.
For a complete working example, you must compile and use these classes. The `UpdateEmployeeInfo` method is not completely implemented, so you will not insert data into the Northwind Traders database when you experiment with this code example.
[!code-csharp[System.Web.UI.WebControls.ObjectDataSource_4#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/CS/northwindemployee4.cs#2)]
[!code-vb[System.Web.UI.WebControls.ObjectDataSource_4#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_4/VB/northwindemployee4.vb#2)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Insert(System.Collections.IDictionary)" />
</Docs>
</Member>
<Member MemberName="InsertParameters">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ParameterCollection InsertParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.ParameterCollection InsertParameters" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property InsertParameters As ParameterCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::ParameterCollection ^ InsertParameters { System::Web::UI::WebControls::ParameterCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.InsertParameters : System.Web.UI.WebControls.ParameterCollection" Usage="System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ParameterCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the parameters collection that contains the parameters that are used by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> method.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.ParameterCollection" /> that contains the parameters used by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The names and types of the parameters that are contained in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection must match the names and types of the parameters that are in the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property signature. When working with data-bound controls that supply parameters, such as <xref:System.Web.UI.WebControls.GridView> and <xref:System.Web.UI.WebControls.DetailsView>, the <xref:System.Web.UI.WebControls.ObjectDataSource> 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 <xref:System.Web.UI.WebControls.ObjectDataSource.InsertMethod%2A>.
## Examples
This section contains two code examples. The first code example demonstrates how to display filtered data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.DetailsView> control to insert data. The second code example provides an example implementation of the `Insert` method that is used in the first code example.
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.DetailsView> control to insert data. The <xref:System.Web.UI.WebControls.DetailsView> initially displays a new `NorthwindEmployee` record, along with an automatically generated **Insert** button. After you enter data into the fields of the <xref:System.Web.UI.WebControls.DetailsView> control, click the **Insert** button. The <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property identifies which method performs the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation.
If you click the **Insert** button, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation is performed using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property and any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection. In this code example, one parameter is specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection that corresponds to the supervisor's ID. This is because even though the ID is displayed in the <xref:System.Web.UI.WebControls.DetailsView.Fields%2A> collection for the <xref:System.Web.UI.WebControls.DetailsView> control as a <xref:System.Web.UI.WebControls.BoundField> object, it will be passed as a string to the <xref:System.Web.UI.WebControls.ObjectDataSource> control. By adding it explicitly to the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection with a <xref:System.Web.UI.WebControls.Parameter.Type%2A> property that is set to the <xref:System.TypeCode.Int32> value, it will be passed correctly by the <xref:System.Web.UI.WebControls.ObjectDataSource> to the method as an `int`, not as `string`.
When the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> operation is performed, the method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod%2A> property is called. If the `Insert` method of the object has a method signature that includes parameters, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.InsertParameters%2A> collection must contain a parameter with names that match the method signature parameters for the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Insert%2A> to complete successfully.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_8#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_8/CS/objds8cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_8#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_8/VB/objds8vb.aspx#1)]
The following code example provides an example implementation of the `Insert` method that the preceding code example uses. The `InsertNewEmployeeWrapper` method is added to the `EmployeeLogic` middle-tier object to enable the object to work more easily with the <xref:System.Web.UI.WebControls.ObjectDataSource> control in Web scenarios, without a substantial rewrite to the actual business logic.
[!code-csharp[System.Web.UI.WebControls.ObjectDataSource_8#3](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_8/CS/northwindemployee8.cs#3)]
[!code-vb[System.Web.UI.WebControls.ObjectDataSource_8#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_8/VB/northwindemployee8.vb#3)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.InsertMethod" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Insert(System.Collections.IDictionary)" />
</Docs>
</Member>
<Member MemberName="IsTrackingViewState">
<MemberSignature Language="C#" Value="protected bool IsTrackingViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsTrackingViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.IsTrackingViewState" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property IsTrackingViewState As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property bool IsTrackingViewState { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsTrackingViewState : bool" Usage="System.Web.UI.WebControls.ObjectDataSourceView.IsTrackingViewState" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Web.UI.IStateManager.IsTrackingViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object is saving changes to its view state.</summary>
<value>
<see langword="true" />, if the data source view is marked to save its state; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.LoadViewState(System.Object)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.TrackViewState" />
</Docs>
</Member>
<Member MemberName="LoadViewState">
<MemberSignature Language="C#" Value="protected virtual void LoadViewState (object savedState);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void LoadViewState(object savedState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub LoadViewState (savedState As Object)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void LoadViewState(System::Object ^ savedState);" />
<MemberSignature Language="F#" Value="abstract member LoadViewState : obj -&gt; unit&#xA;override this.LoadViewState : obj -&gt; unit" Usage="objectDataSourceView.LoadViewState savedState" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.LoadViewState(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">An object that represents the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> state to restore.</param>
<summary>Restores previously saved view state for the data source view.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
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](https://msdn.microsoft.com/library/0218d965-5d30-445b-b6a6-8870e70e63ce(v=vs.100)).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.LoadViewState%2A> method restores view-state information for the <xref:System.Web.UI.WebControls.ObjectDataSourceView> object from a previous page request that was saved by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState%2A> method.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.IsTrackingViewState" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.TrackViewState" />
</Docs>
</Member>
<Member MemberName="MaximumRowsParameterName">
<MemberSignature Language="C#" Value="public string MaximumRowsParameterName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string MaximumRowsParameterName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName" />
<MemberSignature Language="VB.NET" Value="Public Property MaximumRowsParameterName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ MaximumRowsParameterName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.MaximumRowsParameterName : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>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.</summary>
<value>The name of the method parameter used to indicate the number of records to retrieve. The default is <c>"maximumRows"</c>.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName%2A> property is used to support data source paging. For more information, see <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A>.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName%2A> property is stored in view state.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanPage" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.MaximumRowsParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSource.StartRowIndexParameterName" />
</Docs>
</Member>
<Member MemberName="ObjectCreated">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler ObjectCreated;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler ObjectCreated" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ObjectCreated As ObjectDataSourceObjectEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceObjectEventHandler ^ ObjectCreated;" />
<MemberSignature Language="F#" Value="member this.ObjectCreated : System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler " Usage="member this.ObjectCreated : System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs after the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object creates an instance of the type that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" /> property.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> control calls the `Data` methods for the business object. A reference to the object is accessed by the <xref:System.Web.UI.WebControls.ObjectDataSourceEventArgs.ObjectInstance%2A> property, which is exposed by the <xref:System.Web.UI.WebControls.ObjectDataSourceEventArgs> object.
If the method that is identified to perform the data operation is `static` (`Shared` in Visual Basic), the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating> and <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated> events are never raised.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreated(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" />
</Docs>
</Member>
<Member MemberName="ObjectCreating">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler ObjectCreating;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler ObjectCreating" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ObjectCreating As ObjectDataSourceObjectEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceObjectEventHandler ^ ObjectCreating;" />
<MemberSignature Language="F#" Value="member this.ObjectCreating : System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler " Usage="member this.ObjectCreating : System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object creates an instance of the type that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" /> property.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSource> control automatically calls the default constructor of a business object to create and instance of it using reflection. Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating> event to explicitly call another constructor and to set the instance of the object that results to the <xref:System.Web.UI.WebControls.ObjectDataSourceEventArgs.ObjectInstance%2A> property of the associated <xref:System.Web.UI.WebControls.ObjectDataSourceEventArgs> object.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
If the method that is identified to perform the data operation is `static` (`Shared` in Visual Basic), the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating> and <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated> events are never raised.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreating(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" />
</Docs>
</Member>
<Member MemberName="ObjectDisposing">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler ObjectDisposing;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler ObjectDisposing" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ObjectDisposing As ObjectDataSourceDisposingEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceDisposingEventHandler ^ ObjectDisposing;" />
<MemberSignature Language="F#" Value="member this.ObjectDisposing : System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler " Usage="member this.ObjectDisposing : System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceDisposingEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object discards an instance of an object that it has created.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> event is raised before the instance of the business object is discarded. If the business object implements the <xref:System.IDisposable> interface, the <xref:System.IDisposable.Dispose%2A> method is called after The <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> event is raised.
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceEventArgs.ObjectInstance%2A> property, which is exposed by the <xref:System.Web.UI.WebControls.ObjectDataSourceEventArgs> object.
If the method that is identified to perform the data operation is `static` (`Shared` in Visual Basic), the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> event is never raised.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectDisposing(System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" />
</Docs>
</Member>
<Member MemberName="OldValuesParameterFormatString">
<MemberSignature Language="C#" Value="public string OldValuesParameterFormatString { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string OldValuesParameterFormatString" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString" />
<MemberSignature Language="VB.NET" Value="Public Property OldValuesParameterFormatString As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ OldValuesParameterFormatString { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.OldValuesParameterFormatString : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("{0}")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a format string to apply to the names of the parameters for original values that are passed to the <see langword="Delete" /> or <see langword="Update" /> methods.</summary>
<value>A string that represents a format string applied to the names of any <paramref name="oldValues" /> passed to the <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Delete" /> or <see cref="Overload:System.Web.UI.WebControls.ObjectDataSourceView.Update" /> method. The default is "{0}", which means the parameter name is simply the field name.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property is set to the <xref:System.Web.UI.ConflictOptions.CompareAllValues> value and the set of original values that are passed to the corresponding data method.
Two common scenarios where you might change the <xref:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString%2A> property are as follows:
- To differentiate between old and new values in updates. When the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection%2A> property is set to the <xref:System.Web.UI.ConflictOptions.CompareAllValues> value, parameters for both the original and new values are added to the <xref:System.Web.UI.WebControls.ObjectDataSource.UpdateParameters%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.OldValuesParameterFormatString%2A> is stored in view state.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.ConflictDetection" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete(System.Collections.IDictionary,System.Collections.IDictionary)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(System.Collections.IDictionary,System.Collections.IDictionary,System.Collections.IDictionary)" />
</Docs>
</Member>
<Member MemberName="OnDeleted">
<MemberSignature Language="C#" Value="protected virtual void OnDeleted (System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnDeleted(class System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnDeleted (e As ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnDeleted(System::Web::UI::WebControls::ObjectDataSourceStatusEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnDeleted : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit&#xA;override this.OnDeleted : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit" Usage="objectDataSourceView.OnDeleted e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleted" /> event after the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object has completed a delete operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted%2A> 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.
## Examples
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.GridView> control to delete data. The <xref:System.Web.UI.WebControls.GridView> initially displays a set of all employees, using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property to retrieve the data from the `EmployeeLogic` object. Because the <xref:System.Web.UI.WebControls.GridView.AutoGenerateDeleteButton%2A> property is set to `true`, the <xref:System.Web.UI.WebControls.GridView> control automatically displays a **Delete** button.
If you click the **Delete** button, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property and any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. In this code example, some preprocessing and post-processing steps are also performed. The `NorthwindEmployeeDeleting` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleting> event before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed, and the `NorthwindEmployeeDeleted` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleted> event after the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation has completed, to perform an exception handling. In this example, if a `NorthwindDataException` is thrown, it is handled by this delegate.
To examine the implementation of the `EmployeeLogic` middle-tier business object that this code example uses, see <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs>.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/CS/objds10cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/VB/objds10vb.aspx#1)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleted" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Deleted" />
</Docs>
</Member>
<Member MemberName="OnDeleting">
<MemberSignature Language="C#" Value="protected virtual void OnDeleting (System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnDeleting(class System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnDeleting (e As ObjectDataSourceMethodEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnDeleting(System::Web::UI::WebControls::ObjectDataSourceMethodEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnDeleting : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs -&gt; unit&#xA;override this.OnDeleting : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs -&gt; unit" Usage="objectDataSourceView.OnDeleting e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleting" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object attempts a delete operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting%2A> 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.
## Examples
The following code example demonstrates how to use an <xref:System.Web.UI.WebControls.ObjectDataSource> control with a business object and a <xref:System.Web.UI.WebControls.GridView> control to delete data. The <xref:System.Web.UI.WebControls.GridView> initially displays a set of all employees, using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property to retrieve the data from the `EmployeeLogic` object. Because the <xref:System.Web.UI.WebControls.GridView.AutoGenerateDeleteButton%2A> property is set to `true`, the <xref:System.Web.UI.WebControls.GridView> control automatically displays a **Delete** button.
If you click the **Delete** button, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed using the method that is specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteMethod%2A> property and any parameters that are specified in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.DeleteParameters%2A> collection. In this code example, some preprocessing and post-processing steps are also performed. The `NorthwindEmployeeDeleting` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleting> event before the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation is performed, and the `NorthwindEmployeeDeleted` delegate is called to handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Deleted> event after the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Delete%2A> operation has completed, to perform an exception handling. In this example, if a `NorthwindDataException` is thrown, it is handled by this delegate.
To examine the implementation of the `EmployeeLogic` middle-tier business object that this code example uses, see <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs>.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/CS/objds10cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_10#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_10/VB/objds10vb.aspx#1)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnDeleting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Deleting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Deleting" />
</Docs>
</Member>
<Member MemberName="OnFiltering">
<MemberSignature Language="C#" Value="protected virtual void OnFiltering (System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnFiltering(class System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnFiltering(System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnFiltering (e As ObjectDataSourceFilteringEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnFiltering(System::Web::UI::WebControls::ObjectDataSourceFilteringEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnFiltering : System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs -&gt; unit&#xA;override this.OnFiltering : System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs -&gt; unit" Usage="objectDataSourceView.OnFiltering e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Filtering" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object attempts a filtering operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnFiltering%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnFiltering(System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs)" /> method in a derived class, be sure to call the base class's <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnFiltering(System.Web.UI.WebControls.ObjectDataSourceFilteringEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Filtering" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Filtering" />
</Docs>
</Member>
<Member MemberName="OnInserted">
<MemberSignature Language="C#" Value="protected virtual void OnInserted (System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnInserted(class System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnInserted (e As ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnInserted(System::Web::UI::WebControls::ObjectDataSourceStatusEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnInserted : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit&#xA;override this.OnInserted : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit" Usage="objectDataSourceView.OnInserted e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserted" /> event after the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object has completed an insert operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserted(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserted" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Inserted" />
</Docs>
</Member>
<Member MemberName="OnInserting">
<MemberSignature Language="C#" Value="protected virtual void OnInserting (System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnInserting(class System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnInserting (e As ObjectDataSourceMethodEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnInserting(System::Web::UI::WebControls::ObjectDataSourceMethodEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnInserting : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs -&gt; unit&#xA;override this.OnInserting : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs -&gt; unit" Usage="objectDataSourceView.OnInserting e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserting" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object attempts an insert operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreating%2A> 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 about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnInserting(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Inserting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Inserting" />
</Docs>
</Member>
<Member MemberName="OnObjectCreated">
<MemberSignature Language="C#" Value="protected virtual void OnObjectCreated (System.Web.UI.WebControls.ObjectDataSourceEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnObjectCreated(class System.Web.UI.WebControls.ObjectDataSourceEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreated(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnObjectCreated (e As ObjectDataSourceEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnObjectCreated(System::Web::UI::WebControls::ObjectDataSourceEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnObjectCreated : System.Web.UI.WebControls.ObjectDataSourceEventArgs -&gt; unit&#xA;override this.OnObjectCreated : System.Web.UI.WebControls.ObjectDataSourceEventArgs -&gt; unit" Usage="objectDataSourceView.OnObjectCreated e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated" /> event after the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> creates an instance of the object that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" /> property.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreated%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating>.
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreated%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreated(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreated(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.ObjectCreated" />
</Docs>
</Member>
<Member MemberName="OnObjectCreating">
<MemberSignature Language="C#" Value="protected virtual void OnObjectCreating (System.Web.UI.WebControls.ObjectDataSourceEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnObjectCreating(class System.Web.UI.WebControls.ObjectDataSourceEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreating(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnObjectCreating (e As ObjectDataSourceEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnObjectCreating(System::Web::UI::WebControls::ObjectDataSourceEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnObjectCreating : System.Web.UI.WebControls.ObjectDataSourceEventArgs -&gt; unit&#xA;override this.OnObjectCreating : System.Web.UI.WebControls.ObjectDataSourceEventArgs -&gt; unit" Usage="objectDataSourceView.OnObjectCreating e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object creates an instance of a business object to perform a data operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreating%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreating(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectCreating(System.Web.UI.WebControls.ObjectDataSourceEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreating" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.ObjectCreating" />
</Docs>
</Member>
<Member MemberName="OnObjectDisposing">
<MemberSignature Language="C#" Value="protected virtual void OnObjectDisposing (System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnObjectDisposing(class System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectDisposing(System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnObjectDisposing (e As ObjectDataSourceDisposingEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnObjectDisposing(System::Web::UI::WebControls::ObjectDataSourceDisposingEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnObjectDisposing : System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs -&gt; unit&#xA;override this.OnObjectDisposing : System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs -&gt; unit" Usage="objectDataSourceView.OnObjectDisposing e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object discards an instantiated type.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectDisposing%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.TypeName%2A> property implements the <xref:System.IDisposable> interface.
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectDisposing%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectDisposing(System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnObjectDisposing(System.Web.UI.WebControls.ObjectDataSourceDisposingEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.ObjectDisposing" />
</Docs>
</Member>
<Member MemberName="OnSelected">
<MemberSignature Language="C#" Value="protected virtual void OnSelected (System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnSelected(class System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnSelected (e As ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnSelected(System::Web::UI::WebControls::ObjectDataSourceStatusEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnSelected : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit&#xA;override this.OnSelected : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit" Usage="objectDataSourceView.OnSelected e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Selected" /> event after the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object has completed a data retrieval operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Selected" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Selected" />
</Docs>
</Member>
<Member MemberName="OnSelecting">
<MemberSignature Language="C#" Value="protected virtual void OnSelecting (System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnSelecting(class System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting(System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnSelecting (e As ObjectDataSourceSelectingEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnSelecting(System::Web::UI::WebControls::ObjectDataSourceSelectingEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnSelecting : System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs -&gt; unit&#xA;override this.OnSelecting : System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs -&gt; unit" Usage="objectDataSourceView.OnSelecting e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Selecting" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object attempts a data retrieval operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting(System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting(System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Selecting" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Selecting" />
</Docs>
</Member>
<Member MemberName="OnUpdated">
<MemberSignature Language="C#" Value="protected virtual void OnUpdated (System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnUpdated(class System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdated(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnUpdated (e As ObjectDataSourceStatusEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnUpdated(System::Web::UI::WebControls::ObjectDataSourceStatusEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnUpdated : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit&#xA;override this.OnUpdated : System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs -&gt; unit" Usage="objectDataSourceView.OnUpdated e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Updated" /> event after the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object has completed an update operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdated%2A> 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.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdated(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdated(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Updated" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Updated" />
</Docs>
</Member>
<Member MemberName="OnUpdating">
<MemberSignature Language="C#" Value="protected virtual void OnUpdating (System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnUpdating(class System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdating(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnUpdating (e As ObjectDataSourceMethodEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnUpdating(System::Web::UI::WebControls::ObjectDataSourceMethodEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnUpdating : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs -&gt; unit&#xA;override this.OnUpdating : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs -&gt; unit" Usage="objectDataSourceView.OnUpdating e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Updating" /> event before the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object attempts an update operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdating%2A> 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.
## Examples
The following code example demonstrates how to use a <xref:System.Web.UI.WebControls.DropDownList> control, <xref:System.Web.UI.WebControls.TextBox> controls, and several <xref:System.Web.UI.WebControls.ObjectDataSource> controls to update data. The <xref:System.Web.UI.WebControls.DropDownList> displays the name of a `NorthwindEmployee`, while the <xref:System.Web.UI.WebControls.TextBox> controls are used to enter and update address information. Because the <xref:System.Web.UI.WebControls.ObjectDataSourceView.UpdateParameters%2A> collection contains a <xref:System.Web.UI.WebControls.ControlParameter> object that is bound to the selected value of the <xref:System.Web.UI.WebControls.DropDownList>, the button that triggers the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Update%2A> operation is enabled only after an employee is selected.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_13#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_13/CS/objds13cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_13#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_13/VB/objds13vb.aspx#1)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdating(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" /> method in a derived class, be sure to call the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnUpdating(System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs)" /> method for the base class so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Updating" />
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSource.Updating" />
</Docs>
</Member>
<Member MemberName="ParsingCulture">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ParsingCulture ParsingCulture { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.WebControls.ParsingCulture ParsingCulture" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.ParsingCulture" />
<MemberSignature Language="VB.NET" Value="Public Property ParsingCulture As ParsingCulture" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::ParsingCulture ParsingCulture { System::Web::UI::WebControls::ParsingCulture get(); void set(System::Web::UI::WebControls::ParsingCulture value); };" />
<MemberSignature Language="F#" Value="member this.ParsingCulture : System.Web.UI.WebControls.ParsingCulture with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.ParsingCulture" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ParsingCulture</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a or sets a value that indicates what culture information is used when converting string values to actual property types in order to construct an object of the type indicated by <see cref="P:System.Web.UI.WebControls.ObjectDataSource.DataObjectTypeName" />.</summary>
<value>The culture information. The default value is <see cref="F:System.Web.UI.WebControls.ParsingCulture.Invariant" />.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.Globalization.CultureInfo" />
</Docs>
</Member>
<Member MemberName="SaveViewState">
<MemberSignature Language="C#" Value="protected virtual object SaveViewState ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance object SaveViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function SaveViewState () As Object" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Object ^ SaveViewState();" />
<MemberSignature Language="F#" Value="abstract member SaveViewState : unit -&gt; obj&#xA;override this.SaveViewState : unit -&gt; obj" Usage="objectDataSourceView.SaveViewState " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IStateManager.SaveViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Saves the changes to the view state for the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> object since the time when the page was posted back to the server.</summary>
<returns>The object that contains the changes to the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> view state; otherwise <see langword="null" />, if there is no view state associated with the object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState%2A> 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 <xref:System.Web.UI.Control.ViewState%2A> property for the server control, which is an instance of the <xref:System.Web.UI.StateBag> class. The <xref:System.Web.UI.Control.ViewState%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.SaveViewState%2A> method and modifying the `ViewState` property for your server control. For more information, see [ASP.NET State Management Overview](https://msdn.microsoft.com/library/0218d965-5d30-445b-b6a6-8870e70e63ce(v=vs.100)).
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.IsTrackingViewState" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.LoadViewState(System.Object)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.TrackViewState" />
<altmember cref="M:System.Web.UI.IStateManager.SaveViewState" />
</Docs>
</Member>
<Member MemberName="Select">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerable Select (System.Web.UI.DataSourceSelectArguments arguments);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Collections.IEnumerable Select(class System.Web.UI.DataSourceSelectArguments arguments) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
<MemberSignature Language="VB.NET" Value="Public Function Select (arguments As DataSourceSelectArguments) As IEnumerable" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Collections::IEnumerable ^ Select(System::Web::UI::DataSourceSelectArguments ^ arguments);" />
<MemberSignature Language="F#" Value="override this.Select : System.Web.UI.DataSourceSelectArguments -&gt; System.Collections.IEnumerable" Usage="objectDataSourceView.Select arguments" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerable</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arguments" Type="System.Web.UI.DataSourceSelectArguments" />
</Parameters>
<Docs>
<param name="arguments">A <see cref="T:System.Web.UI.DataSourceSelectArguments" /> used to request operations on the data beyond basic data retrieval.</param>
<summary>Retrieves data from the object that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.TypeName" /> property by calling the method that is identified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" /> property and passing any values in the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" /> collection.</summary>
<returns>An <see cref="T:System.Collections.IEnumerable" /> list of data rows. For more information, see <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method calls the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect%2A> passing the `arguments` parameter.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <paramref name="arguments" /> passed to the <see cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" /> method specify that the data source should perform some additional work while retrieving data to enable paging or sorting through the retrieved data, but the data source control does not support the requested capability.</exception>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" />
</Docs>
</Member>
<Member MemberName="SelectCountMethod">
<MemberSignature Language="C#" Value="public string SelectCountMethod { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SelectCountMethod" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod" />
<MemberSignature Language="VB.NET" Value="Public Property SelectCountMethod As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ SelectCountMethod { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.SelectCountMethod : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> control invokes to retrieve a row count.</summary>
<value>A string that represents the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> uses to retrieve a row count. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> identifies a business object method that is used to retrieve a total row count to support data source paging. The <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> property is evaluated, only if the <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A> property is set to `true`. For information on how paging is supported by the <xref:System.Web.UI.WebControls.ObjectDataSourceView>, see <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A>.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectCountMethod%2A> property is stored in view state.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanRetrieveTotalRowCount" />
</Docs>
</Member>
<Member MemberName="Selected">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler Selected;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler Selected" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Selected" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Selected As ObjectDataSourceStatusEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceStatusEventHandler ^ Selected;" />
<MemberSignature Language="F#" Value="member this.Selected : System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler " Usage="member this.Selected : System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceStatusEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a data retrieval operation has completed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Selected> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs> object that is associated with the event.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Selecting" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelected(System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" />
</Docs>
</Member>
<Member MemberName="Selecting">
<MemberSignature Language="C#" Value="public event System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler Selecting;" />
<MemberSignature Language="ILAsm" Value=".event class System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler Selecting" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.WebControls.ObjectDataSourceView.Selecting" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Selecting As ObjectDataSourceSelectingEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Web::UI::WebControls::ObjectDataSourceSelectingEventHandler ^ Selecting;" />
<MemberSignature Language="F#" Value="member this.Selecting : System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler " Usage="member this.Selecting : System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before a data retrieval operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Selecting> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> control performs the data retrieval operation. The parameters are available as an <xref:System.Collections.IDictionary> collection that is accessed by the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs.InputParameters%2A> property, which is exposed by the <xref:System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs> object.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.WebControls.ObjectDataSourceView.Selected" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting(System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs)" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" />
</Docs>
</Member>
<Member MemberName="SelectMethod">
<MemberSignature Language="C#" Value="public string SelectMethod { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SelectMethod" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />
<MemberSignature Language="VB.NET" Value="Public Property SelectMethod As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ SelectMethod { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.SelectMethod : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> control invokes to retrieve data.</summary>
<value>A string that represents the name of the method or function that the <see cref="T:System.Web.UI.WebControls.ObjectDataSourceView" /> uses to retrieve data. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The specified method can have any method signature but must return one of the types listed in the following table in order for the <xref:System.Web.UI.WebControls.ObjectDataSource> control to call it successfully
|Return type|Action|
|-----------------|------------|
|<xref:System.Collections.IEnumerable>|The <xref:System.Collections.IEnumerable> is returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
|<xref:System.Data.DataTable>|A <xref:System.Data.DataView> is created using the <xref:System.Data.DataTable> and returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
|<xref:System.Data.DataSet>|The first <xref:System.Data.DataTable> of the <xref:System.Data.DataSet> is extracted and a <xref:System.Data.DataView> is created and returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
|<xref:System.Object>|The object is wrapped in a one-element <xref:System.Collections.IEnumerable> and returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method.|
The method that is identified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> method is called. You can handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectCreated> event to work with the business object before the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property is called. You can also handle the <xref:System.Web.UI.WebControls.ObjectDataSourceView.ObjectDisposing> event that is raised after the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property is called. (`Dispose` is called only if the business object implements the <xref:System.IDisposable> 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 <xref:System.Web.UI.WebControls.ObjectDataSource> 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 <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> collection. If the parameters in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> collection do not match those of the signature of the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property, the data source throws an exception.
For more information, see <xref:System.Web.UI.WebControls.ObjectDataSource.SelectMethod?displayProperty=nameWithType>.
## Examples
The following code example demonstrates how a <xref:System.Web.UI.WebControls.GridView> control can display data using an <xref:System.Web.UI.WebControls.ObjectDataSource> control on a Web Forms page. The <xref:System.Web.UI.WebControls.ObjectDataSource> identifies a partially or fully qualified class name with its <xref:System.Web.UI.WebControls.ObjectDataSource.TypeName%2A> property and a method that is called to retrieve data with its <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property. At run time, the object is created and the method is called using reflection. The <xref:System.Web.UI.WebControls.GridView> control enumerates through the <xref:System.Collections.IEnumerable> collection that is returned by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A>, and then displays the data.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_1#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_1/CS/objds1cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_1#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_1/VB/objds1vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
</Docs>
</Member>
<Member MemberName="SelectParameters">
<MemberSignature Language="C#" Value="public System.Web.UI.WebControls.ParameterCollection SelectParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.WebControls.ParameterCollection SelectParameters" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property SelectParameters As ParameterCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::WebControls::ParameterCollection ^ SelectParameters { System::Web::UI::WebControls::ParameterCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.SelectParameters : System.Web.UI.WebControls.ParameterCollection" Usage="System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.WebControls.ParameterCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the parameters collection containing the parameters that are used by the <see cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" /> method.</summary>
<value>A <see cref="T:System.Web.UI.WebControls.ParameterCollection" /> that contains the parameters used by the method specified by the <see cref="P:System.Web.UI.WebControls.ObjectDataSource.SelectMethod" /> property.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The names and types of the parameters that are contained in the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> collection must match the names and types of the parameters that are in the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> property signature. When working with data-bound controls that supply parameters, such as <xref:System.Web.UI.WebControls.GridView> and <xref:System.Web.UI.WebControls.DetailsView>, the <xref:System.Web.UI.WebControls.ObjectDataSource> 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 <xref:System.Web.UI.WebControls.ObjectDataSource.SelectMethod?displayProperty=nameWithType>.
## Examples
The following code example demonstrates how to retrieve a single data record using an <xref:System.Web.UI.WebControls.ObjectDataSource> control, and then display the data record in a <xref:System.Web.UI.WebControls.DetailsView> control. The <xref:System.Web.UI.WebControls.ObjectDataSource> retrieves a specific employee record by calling the `GetEmployee` method of the `EmployeeLogic` class. The `GetEmployee` method requires an employee ID parameter. The <xref:System.Web.UI.WebControls.ObjectDataSource> control uses a <xref:System.Web.UI.WebControls.QueryStringParameter> object in its <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectParameters%2A> collection to pass an ID to the `GetEmployee` method.
To view the example implementation of the `EmployeeLogic` class and the `GetEmployee` method, see <xref:System.Web.UI.WebControls.ObjectDataSource>.
[!code-aspx-csharp[System.Web.UI.WebControls.ObjectDataSource_3#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_3/CS/objds3cs.aspx#1)]
[!code-aspx-vb[System.Web.UI.WebControls.ObjectDataSource_3#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.WebControls.ObjectDataSource_3/VB/objds3vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
</Docs>
</Member>
<Member MemberName="SortParameterName">
<MemberSignature Language="C#" Value="public string SortParameterName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SortParameterName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.SortParameterName" />
<MemberSignature Language="VB.NET" Value="Public Property SortParameterName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ SortParameterName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.SortParameterName : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.SortParameterName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the name of the data retrieval method parameter that is used to specify a sort expression for data source sorting support.</summary>
<value>The name of the method parameter used to indicate the parameter that accepts this sort expression value. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.SortParameterName%2A> property is used to support data source sorting. When a <xref:System.Web.UI.DataSourceSelectArguments.SortExpression%2A> property is set on the <xref:System.Web.UI.DataSourceSelectArguments> object and passed to the <xref:System.Web.UI.WebControls.ObjectDataSourceView.Select%2A> method, the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SortParameterName%2A> property identifies the parameter name of the method specified by the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SelectMethod%2A> business object property that accepts the sort expression value.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.SortParameterName%2A> property is stored in view state.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanSort" />
</Docs>
</Member>
<Member MemberName="StartRowIndexParameterName">
<MemberSignature Language="C#" Value="public string StartRowIndexParameterName { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string StartRowIndexParameterName" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName" />
<MemberSignature Language="VB.NET" Value="Public Property StartRowIndexParameterName As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ StartRowIndexParameterName { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.StartRowIndexParameterName : string with get, set" Usage="System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>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.</summary>
<value>The name of the business object method parameter used to indicate the first record to retrieve. The default is "startRowIndex".</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName%2A> property must be set to enable paging. For information on how paging is supported by the <xref:System.Web.UI.WebControls.ObjectDataSourceView> object, see <xref:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging%2A>.
The value of the <xref:System.Web.UI.WebControls.ObjectDataSourceView.StartRowIndexParameterName%2A> property is stored in view state.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.MaximumRowsParameterName" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.EnablePaging" />
<altmember cref="P:System.Web.UI.WebControls.ObjectDataSourceView.CanPage" />
<altmember cref="M:System.Web.UI.WebControls.ObjectDataSourceView.Select(System.Web.UI.DataSourceSelectArguments)" />
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.IsTrackingViewState">
<MemberSignature Language="C#" Value="bool System.Web.UI.IStateManager.IsTrackingViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Web.UI.IStateManager.IsTrackingViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.ObjectDataSourceView.System#Web#UI#IStateManager#IsTrackingViewState" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsTrackingViewState As Boolean Implements IStateManager.IsTrackingViewState" />
<MemberSignature Language="C++ CLI" Value="property bool System::Web::UI::IStateManager::IsTrackingViewState { bool get(); };" />
<MemberSignature Language="F#" Usage="System.Web.UI.IStateManager.IsTrackingViewState" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Web.UI.IStateManager.IsTrackingViewState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<