DataSourceView.Insert(IDictionary, DataSourceViewOperationCallback) 方法

定義

DataSourceView 物件表示的資料清單上,執行非同步插入作業。Performs an asynchronous insert operation on the list of data that the DataSourceView object represents.

public:
 virtual void Insert(System::Collections::IDictionary ^ values, System::Web::UI::DataSourceViewOperationCallback ^ callback);
public virtual void Insert (System.Collections.IDictionary values, System.Web.UI.DataSourceViewOperationCallback callback);
abstract member Insert : System.Collections.IDictionary * System.Web.UI.DataSourceViewOperationCallback -> unit
override this.Insert : System.Collections.IDictionary * System.Web.UI.DataSourceViewOperationCallback -> unit
Public Overridable Sub Insert (values As IDictionary, callback As DataSourceViewOperationCallback)

參數

values
IDictionary

進行插入作業時使用之名稱/值組的 IDictionaryAn IDictionary of name/value pairs used during an insert operation.

callback
DataSourceViewOperationCallback

DataSourceViewOperationCallback 委派,當非同步作業完成時,用來告知資料繫結控制項。A DataSourceViewOperationCallback delegate that is used to notify a data-bound control when the asynchronous operation is complete.

例外狀況

備註

Insert方法是所有資料來源 view 物件的非同步資料插入介面。The Insert method is the asynchronous data insertion interface for all data source view objects. Insert方法會 ExecuteInsert 使用任何提供的來呼叫方法 valuesThe Insert method calls the ExecuteInsert method using any values supplied. callback參數是一個委派,資料繫結控制項會傳遞至資料來源視圖,用來在作業完成時通知資料繫結控制項 ExecuteInsertThe callback parameter is a delegate that a data-bound control passes to the data source view, which is used to notify the data-bound control when the ExecuteInsert operation has completed. 方法會使用委派的參數 DataSourceViewOperationCallback 來傳回受影響的記錄數目,以及方法呼叫所擲回的任何 Exception 例外狀況 ExecuteInsertThe method uses the parameters of the DataSourceViewOperationCallback delegate to return the number of affected records and any Exception exception that is thrown by the ExecuteInsert method call.

適用於

另請參閱