Handle the SqlDataSourceView.Selecting event to perform additional initialization operations that are specific to your application, to validate the values of parameters, or to change the parameter values before the System.Web.UI.WebControls.SqlDataSource control performs the data retrieval operation.
For more information about handling events, see Consuming Events.