ObjectDataSourceView::UpdateParameters Property

 

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

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

public:
property ParameterCollection^ UpdateParameters {
	ParameterCollection^ get();
}

Property Value

Type: System.Web.UI.WebControls::ParameterCollection^

A ParameterCollection that contains the parameters used by the UpdateMethod property.

The names and types of the parameters that are contained in the UpdateParameters collection must match the names and types of the parameters that are in the method specified by the UpdateMethod property signature. The parameter names are affected by the OldValuesParameterFormatString property and are case sensitive. When working with data-bound controls that supply parameters, such as GridView and DetailsView, the 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 ObjectDataSource::UpdateMethod.

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 NorthwindEmployee, while the TextBox controls are used to enter and update address information. Because the UpdateParameters collection contains a ControlParameter object that is bound to the selected value of the DropDownList, the button that triggers the Update operation is enabled only after an employee is selected.

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

.NET Framework
Available since 2.0
Return to top
Show: