protected void btn_Save_Click(object sender, EventArgs e) { try { if (ValidateBreed()) { ddt = objDist.InsertBreedBAL(txtBreedCode.Text.Trim(), ddl_AnimalType.SelectedValue.ToString(), txtBreedName.Text.Trim(), UserName, ConnKey); if (ddt.Rows.Count > 0) { objCommon.ShowAlertMessage(ddt.Rows[0][0].ToString()); txtBreedCode.Text = ""; txtBreedName.Text = ""; } Viewdata(); } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex, Session["UsrName"].ToString(), Request.ServerVariables["REMOTE_ADDR"].ToString()); Response.Redirect("~/Error.aspx"); } finally { } }