Gets the parameters collection that contains the parameters that are used by the DeleteMethod method.
Assembly: System.Web (in System.Web.dll)
The names and types of the parameters that are contained in the collection must match the names and types of the parameters in the DeleteMethod method signature. The parameter names are affected by the OldValuesParameterFormatString property and are case-sensitive. The parameters in the collection depend on the data that is in the data-bound control, the parameters that are specified declaratively, and the parameters that are added programmatically. For more information, see "Parameter Merging" in Delete and Using Parameters with the ObjectDataSource Control.
For more information about parameter merging, object lifetime, and method resolution, see DeleteMethod.
This section contains two code examples. The first code example demonstrates how to use an ObjectDataSource object with a business object and a GridView control to delete 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 the property of the ObjectDataSource control with a business object and a GridView control to delete data. Initially, the GridView control displays a set of all employees, using the method that is specified by the SelectMethod property to retrieve the data from the EmployeeLogic object. Because the AutoGenerateDeleteButton property is set to true, the GridView control automatically displays a Delete button.
If you click the Delete button, the Deleting event is called with two parameters. One parameter, EmpID, comes from the DataGrid control, and is based on the DataKeyNames property. The other parameter comes from the declarative property. The EmployeeLogic class overloads the DeleteEmployee method. One overload takes a NorthwindEmployee parameter, and the other takes an Int32 parameter named anID. In the Deleting event, the entries in the InputParameters property are adjusted to include only one parameter named anID with the value from original_EmpID. When the event handler exists, the matching DeleteEmployee method is called.
The following code example shows the EmployeeLogic class that is used in the preceding code example.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.