protected void fvAg_WFP3_BMP_ItemDeleting(object sender, EventArgs e) { FormView fv = fvAg_WFP3_BMP; int iCode = 0; using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext()) { try { iCode = wDataContext.form_wfp3_bmp_delete(Convert.ToInt32(fv.DataKey.Value), Session["userName"].ToString()); if (iCode != 0) { WACAlert.Show("Error Returned from Database.", iCode); } } catch (Exception ex) { WACAlert.Show(ex.Message, 0); } } }