Gets a collection of parameters that are used by the method specified by the ObjectDataSource.SelectMethod property.
Documentation for this section has not yet been entered.
The ObjectDataSource.SelectParameters property gets the ObjectDataSourceView.SelectParameters property of the System.Web.UI.WebControls.ObjectDataSourceView object that is associated with the System.Web.UI.WebControls.ObjectDataSource control.
You add parameters to the ObjectDataSource.SelectParameters collection declaratively by using the SelectParameters element or programmatically in the handler for the ObjectDataSource.Selecting event. At run time, parameters listed in the SelectParameters element are added to the collection first. Parameters in the collection are then added or removed by the handler for the ObjectDataSource.Selecting event. The ObjectDataSource.Selecting event is raised before the ObjectDataSource.Select method is run.
Before the ObjectDataSource.Select method is run, the names and types of the parameters that are contained in the ObjectDataSource.SelectParameters collection must match the signature of the method that is specified by the ObjectDataSource.SelectMethod property. For example, if a select method named GetEmployeesByStateAndAge takes a string and an integer as parameters, the ObjectDataSource.SelectParameters collection must contain two parameters. The first parameter must resolve to a string and the second parameter must resolve to an integer. Both parameters can be specified in markup in the SelectParameters element. Alternatively, they can be can be added in the ObjectDataSource.Selecting event handler, or one parameter can be added in markup and the other one can be added programmatically.
For more information, see Using Parameters with the ObjectDataSource Control and the ObjectDataSource.SelectMethod property.
In the code for the ObjectDataSource.Selecting event handler or in the method that is specified by the ObjectDataSource.SelectMethod property, make sure that you validate any parameter value that is received from the client.