System.Web 2.0.0.0 System.ComponentModel.CancelEventArgs The control raises the event when an Insert button (a button with its CommandName property set to "Insert") within the control is clicked, but before the control inserts the record. This allows you to provide an event-handling method that performs a custom routine, such as HTML encoding or validating the values of a record before inserting it in the data source, whenever this event occurs. A object is passed to the event-handling method, which allows you to determine the value of an optional command argument sent to the control and to indicate that the insert operation should be canceled. To determine the value of the command argument, use the property. To cancel the insert operation, set the property to true. You can also read or modify the field values for the new record by using the property. For more information about handling events, see Consuming Events. For a list of initial property values for an instance of the class, see the constructor. Provides data for the event. Constructor To be added. Use this constructor to initialize a new instance of the class. The following table shows the initial property value for an instance of the class. Property Initial Value The value of the parameter. This constructor is used primarily by control developers when raising events. Initializes a new instance of the class. 2.0.0.0 Property System.Object To be added. When you create an Insert button for one of the templates in a control, you can optionally specify a command argument for the button by using the property. The command argument usually contains any extra information you want to accompany the insert command, such the value for the key field. The property is provided as a convenient way to determine the value of the Insert button's command argument. Gets the command argument for the insert operation passed to the control. 2.0.0.0 Property System.Collections.Specialized.IOrderedDictionary To be added. Use the property to access the values of the fields for the record to insert. For example, you can HTML encode or validate the values of the record before inserting it in the data source. The property returns an object that implements the interface. The object contains objects that represent the fields of the record. To access the field names, use the property of the object. Similarly, you can access the field values by using the property. As a shortcut, you can also use the indexer of the object to access the field values directly. The advantage in using the indexer is that it returns field values directly. Data source controls that rely on the field order (such as ) can access field values only by index. Gets a dictionary that contains the field name/value pairs for the record to insert. 2.0.0.0