protected void dvDataSource_Updating(object sender, ObjectDataSourceMethodEventArgs e) { Deal d = e.InputParameters["newEntity"] as Deal; DealController.ValidateUpdateCode(d.ID, d.Code); }