System.Web.UI.WebControls.ObjectDataSource.InsertParameters Property

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

Syntax

[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Editor("System.Web.UI.Design.WebControls.ParameterCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.MergableProperty(false)]
public ParameterCollection InsertParameters { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The names and types of the parameters that are contained in the ObjectDataSource.InsertParameters collection must match the names and types of the parameters that are in the ObjectDataSource.InsertMethod property signature. The parameter names are case sensitive. When working with data-bound controls that supply parameters, such as the System.Web.UI.WebControls.GridView and System.Web.UI.WebControls.DetailsView controls, the System.Web.UI.WebControls.ObjectDataSource control automatically merges any parameters that are explicitly specified in the collection with the parameters that are provided by the data-bound control. This is important because data-bound controls always supply their parameters as string types, and if the method signature includes numeric or date types, you must explicitly include a parameter in the ObjectDataSource.InsertParameters collection with the correct type. Otherwise, the System.Web.UI.WebControls.ObjectDataSource control attempts to cast the parameters according to the type that is defined by the parameters in the collection. For more information, see Using Parameters with the ObjectDataSource Control.

The ObjectDataSource.InsertParameters property retrieves the ObjectDataSourceView.InsertParameters property that is contained by the System.Web.UI.WebControls.ObjectDataSourceView that is associated with the System.Web.UI.WebControls.ObjectDataSource control.

For more information about parameter merging, object lifetime, and method resolution, see ObjectDataSource.InsertMethod.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0