Asp – Which event fires after using the Cancel command on a DetailsView

asp.netpage-lifecycle

I need to perform a few checks (enable or disable a label elsewhere on the page) after the user Inserts or Cancels the DetailsView. I have to do this because the DropDownList.SelectedIndexChanged doesn't fire during this event (which is dumb in my opinion, since the index DOES change).

Best Solution

ModeChanging should fire, so can you do this?

protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e)
{
    if (e.CancelingEdit)
    {
        //Checks
    }
}
Related Question