protected void btn_Save_Click(object sender, EventArgs e) { if (Validate()) { int ActiveSt = Convert.ToInt16(rbnSy.SelectedValue); DataTable dt = new DataTable(); try { dt = objDist.InsertSuplyBAL(ddl_State.SelectedValue.ToString(), ddl_dist_code.SelectedValue.ToString(), txtSname.Text.Trim(), txtSaddress.Text.Trim(), txtemail.Text.Trim(), txtMbno.Text.Trim(), ActiveSt, UserName, "I", ConnKey); if (dt.Rows.Count > 0) { objCommon.ShowAlertMessage(dt.Rows[0][0].ToString()); txtSname.Text = ""; txtSaddress.Text = ""; txtemail.Text = ""; txtMbno.Text = ""; } Viewdata(); } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString()); Response.Redirect("~/Error.aspx"); } finally { } } }