LinqDataSource.Insert Method (IDictionary)

 

Performs an insert operation.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

member Insert : 
        values:IDictionary -> int

Parameters

values
Type: System.Collections.IDictionary

The row values to be inserted into the data source.

Return Value

Type: System.Int32

The number of rows affected by the insert operation.

Typically, you do not have to call the Insert method from your code. The data-bound control will automatically call the Insert method when the user takes action to insert a new record. You explicitly call the Insert method when you want to create your own process for inserting data.

The following example shows how to programmatically insert a new record in the data source after the user clicks a button. The code passes a ListDictionary object that contains default values to the Insert method.

No code example is currently available or this language may not be supported.

The following example shows the markup for the previous example.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: