protected void btnAdd_Click(object sender, EventArgs e) { string Field = TxtBxField.Text; string Type = TxtBxType.Text; string value = TxtBxValue.Text; string FieldGroup = TxtBxFieldGroupPopup.Text; string Description = TxtBxDescription.Text; DataSet ds = new DataSet(); try { ds = obj_BAL_Student_Dashboard.BAL_Insert_SysConfigFields(Field, Type, value, FieldGroup, Description); if (ds.Tables.Count > 0) { t1 = Convert.ToInt16(ds.Tables[0].Rows[0]["Status"].ToString()); if (t1 == 2) { Response.Write("<script LANGUAGE='JavaScript' >alert('Data is entered successfully.')</script>"); FillDDLFieldGroup(ddlFieldGroup); ClearControls(); mp1.Hide(); } if (t1 == 1) { Response.Write("<script LANGUAGE='JavaScript' >alert('Duplicate data can not be entered.')</script>"); ClearControls(); mp1.Hide(); } } else { Response.Write("<script LANGUAGE='JavaScript' >alert('Data not entered.')</script>"); ClearControls(); mp1.Hide(); } } catch (Exception ex) { Response.Write(ex.Message); } }