This documentation is archived and is not being maintained.

ObjectDataSourceMethodEventArgs::InputParameters Property

Gets a collection that contains business object method parameters and their values.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
property IOrderedDictionary^ InputParameters {
	IOrderedDictionary^ get ();
}

Property Value

Type: System.Collections.Specialized::IOrderedDictionary
An IDictionary of name/value pairs that represent the business object method parameters and their corresponding values.

Parameters can be passed to the business object method by reference or by value. If you use an ObjectDataSourceMethodEventHandler object to handle the Selecting, Updating, Inserting, or Deleting events, you can access and manipulate these parameters using the InputParameters property. Any changes to the parameters in this dictionary will affect which method overload is called for the operation. When the DataObjectTypeName property of the ObjectDataSource control is set, you can modify only the data object properties for the items in this dictionary; you cannot add or remove parameters. For more information, see Delete.

Parameters that are passed by reference are returned in the OutputParameters property of the ObjectDataSourceStatusEventArgs object.

The following code example demonstrates how to use a DropDownList control, TextBox controls, and several ObjectDataSource controls to update data. The DropDownList displays the name of a Northwind Employee, while the TextBox controls are used to enter and update address information. Because the UpdateParameters property contains a ControlParameter object that is bound to the selected value of the DropDownList control, the button that triggers the Update method is only enabled after an employee is selected.

In this example, the NorthwindEmployeeUpdating method is called before the Update method to add the correct parameters and values to the InputParameters collection. You can add the parameters and values dynamically, as demonstrated, or declaratively.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: