System.Web.UI.WebControls.SqlDataSourceView.Insert Method

Performs an insert operation using the SqlDataSourceView.InsertCommand SQL string, any parameters that are specified in the SqlDataSourceView.InsertParameters collection, and the values that are in the specified values collection.

Syntax

public int Insert (IDictionary values)

Parameters

values
An IDictionary of parameters for the SqlDataSourceView.InsertCommand property to use to perform the insert database operation. If there are no parameters associated with the query or if the SqlDataSourceView.InsertCommand is not a parameterized SQL query, pass null.

Returns

A value that represents the number of rows inserted into the underlying database.

Remarks

The SqlDataSourceView.Insert(IDictionary) method calls the SqlDataSourceView.ExecuteInsert(IDictionary) method, passing the values parameter.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0