System.Web.UI.WebControls Namespace SqlDataSource Class
.NET Framework version 2.0
Returns the parameters collection that contains the parameters that are used by the UpdateCommand property from the SqlDataSourceView control that is associated with the SqlDataSource control.
Inline |
<asp:SqlDataSource updateparameters = strSQL ... > |
Script |
SqlDataSource.UpdateParameters [ = strSQL ] |
The property is read/write with no default value.
If the UpdateCommand property contains a parameterized SQL query, the UpdateParameters collection contains any Parameter objects that correspond to the parameter placeholders in the SQL string.
Parameter names might be affected by the OldValuesParameterFormatString property, specifically if the name identifies a primary key, such as a key specified using the DataKeyNames property of the data-bound control, or in delete and update scenarios where the ConflictDetection property is set to the CompareAllValues value and a set of oldValues are passed to the corresponding data method. In this case, the format string is applied to each parameter name in the oldValues collection.
The order of the parameters in the UpdateParameters collection might be important, depending on the ADO.NET provider. The System.Data.OleDb and System.Data.Odbc providers associate the parameters in the collection according to the order that the parameters appear in the parameterized SQL query. The System.Data.SqlClient provider, which is the default ADO.NET provider for the SqlDataSource control, associates the parameters in the collection by matching the name of the parameter with a placeholder alias in the SQL query. For more information on parameterized SQL queries and commands, see Using Parameters with the SqlDataSource Control.
The UpdateParameters property retrieves the UpdateParameters property that is contained by the SqlDataSourceView object that is associated with the SqlDataSource control.