protected void btn_Save_Click(object sender, EventArgs e) { try { if (Validate()) { string StateCode = Session["StateCd"].ToString(); INSERT = "I"; string UserName = Session["UsrName"].ToString(); DataTable dt = new DataTable(); dt = objDist.InsertUomBAL(txtUnitCode.Text, txtUnitName.Text.Trim(), UserName, INSERT, ConnKey); if (dt.Rows.Count > 0) { objCommon.ShowAlertMessage(dt.Rows[0][0].ToString()); txtUnitCode.Text = ""; txtUnitName.Text = ""; } Viewdata(); } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString()); Response.Redirect("~/Error.aspx"); } finally { } }