Capture FormView Cancel Event

  • Thread starter Thread starter sck10
  • Start date Start date
S

sck10

Hello,

When using a FormView, DetailsView or GridView, how do you capture the
cancel event when you are in the insert/update mode. I have a formview that
I need to hide if the person clicks on the "cancel" link. Any help would be
appreciated.
 
Hi Sck10,

Welcome to the MSDN newsgroup.

As for the Cancel Event, the ASP.NET 2.0 FormView or DetailsView control
dosn't provide a built-in direct event, however they still provide the
"ItemCommand" event which can hook all the postback event of the user's
data processing operations (like edit, update, insert....). You can have a
look at the related msdn document on the "ItemCommand" event:

#FormView.ItemCommand Event
http://msdn2.microsoft.com/en-us/library(d=robot)/system.web.ui.webcontrols.
formview.itemcommand.aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top