Gets the parameters collection that contains the parameters that are used by the method that is specified by the UpdateMethod property.
Assembly: System.Web (in System.Web.dll)
[<PersistenceModeAttribute(PersistenceMode.InnerProperty)>] member UpdateParameters : ParameterCollection with get
The names and types of the parameters that are contained in the collection must match the names and types of the parameters in the UpdateMethod method signature. The parameter names are affected by the OldValuesParameterFormatString property and are case-sensitive. The parameters in the collection depend on the data in the data-bound control, the parameters that are specified declaratively, and the parameters that are added programmatically. For more information, see the "Parameter Merging" section in Update and Using Parameters with the ObjectDataSource Control.
For more information about parameter merging, object lifetime, and method resolution, see UpdateMethod.
You should validate any parameter value that you receive from the client. The runtime simply substitutes the parameter value into the UpdateMethod property.
This section contains two code examples. The first code example demonstrates how to use a DropDownList control, TextBox controls, and several ObjectDataSource objects to update data. The second code example shows the EmployeeLogic class that is used in the first code example.
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 collection contains a ControlParameter that is bound to the selected value of the DropDownList, the button that raises the Update operation is enabled only after an employee is selected.
This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
The following code example shows the EmployeeLogic class that is used in the preceding code example.