Jun 29, 2011 06:59 PM|smcoxon|LINK
Hi, assuming you are using the ObjectDataSource for retrieving data for your FormView (by setting the FormviewdataSourceID to the ObjectDataSourceID) then when issuing a FormView Update command, it is the FormView updating events that initiates the
ObjectDataSource update events
From Microsoft MSDN: Issuing a FormView Update command Updates the current record in the data source. Raises the ItemUpdated and ItemUpdating events.
Hence the FormView Updating and Updated events will fire even if you cancel the ObjectDataSource updating event in code behind. Therefore, you need to stop the FormView updating event in code behind if the data conditions are not right for updating.
This can be achieved in the same way by using e.cancel in the FormView Updating event.