Capture FormView Cancel Event

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.
 
S

Steven Cheng[MSFT]

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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top