asp.net.ph

FormView.ItemInserting Event

System.Web.UI.WebControls Namespace   FormView Class


.NET Framework version 2.0

Occurs when an Insert command button within a FormView control is clicked, but before the insert operation.

[ VB ]
Public Event ItemInserting As FormViewInsertEventHandler

[ C# ]
public event FormViewInsertEventHandler ItemInserting;

[ C++ ]
public: __event FormViewInsertEventHandler* ItemInserting;

In [ JScript ], you can handle the events defined by a class, but you cannot define your own.

Remarks

The ItemInserting event is raised whenever an Insert button associated with an item in the FormView control is clicked, but before the FormView control inserts the record.

This allows you to provide an event-handling method that performs a custom routine, such as checking the values of a record before inserting it in the data source, whenever this event occurs.

Event Data

Information related to the ItemInserting event is passed via a FormViewInsertEventArgs object to the method assigned to handle the event. The following FormViewInsertEventArgs properties provide information specific to this event.

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled ( inherited from CancelEventArgs )
CommandArgument Gets the command argument for the insert operation passed to the FormView control.
Values Gets a dictionary that contains the field name/value pairs for the record to insert.

See Also

FormView Members   Allowing Users to Add Items in a FormView Control Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph