protected void BtnCancelRMA_Click(object sender, EventArgs e) { try { SendService ss = new SendService(); string delete = ss.DeleteRMA(tcNo.Text); ClientScript.RegisterStartupScript(this.GetType(), "deletedRMA", "alert('" + delete + "');", true); ClientScript.RegisterStartupScript(this.GetType(), "closeRMA", "parent.window.close();", true); } catch (Exception ex) { Log.Error(ex.Message, ex); ClientScript.RegisterStartupScript(this.GetType(), "alertError", "alert('" + ex.Message + "');", true); if (ex.Message.ToLower().Contains("session")) { ClientScript.RegisterStartupScript(this.GetType(), "closeRMA", "parent.window.close();", true); } } }