SqlDataSourceStatusEventArgs.Command Property
Assembly: System.Web (in system.web.dll)
You can handle the Selected, Updated, Inserted, or Deleted event to examine and manipulate the properties of the DbCommand after it is submitted by the SqlDataSource control to the database. The Command property enables you to access return values and values in any output parameters after the database operation is performed through its Parameters property, as well as the CommandText property, which represents the SQL query, command, or stored procedure name that was submitted to the database.
Any output parameters are specifically from parameters that have an InputOutput or Output value for the Direction property of the Parameter object. A return value is from a parameter that has a ReturnValue value.
The following code example demonstrates how to examine the values of output parameters when using a SqlDataSource control with a stored procedure. The SelectParameters collection contains the parameters that the SqlDataSource uses for the stored procedure, and consists of parameters that pass information from the Web form to the stored procedure as well as parameters that pass information back to the form. This code example is part of a larger example provided for the SqlDataSourceStatusEventArgs class.