Hi there,
There are a few ways to do this:
1. Handle the ItemCommand of the DetailsView and then check e.CommandName:
protected void DetailsView1_ItemCommand(object sender, DetailsViewCommandEventArgs e)
{
switch (e.CommandName)
{ .. }
}
2. Convert the CommandField into a TemplateField and then manually wire up the Cancel button to a Click handler in the code behind.
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
Beginning ASP.NET 3.5 : in C# and VB,
ASP.NET 2.0 Instant Results and
Dreamweaver MX 2004
Want to be my colleague? Then check out this post.