public JsonResult Insert_InstituteList(ChoiceFilling _obj) { ChoiceFillingRepository objRep = new ChoiceFillingRepository(); _obj.studentid = Session["studentid"].ToString(); _obj.CreatedBy = Session["studentid"].ToString(); _obj.CreatedIp = Session["localIP"].ToString(); DataSet _ds = objRep.Insert_InstituteList_New(_obj); bool flag = true; if (_ds != null) { if (_ds.Tables[0].Rows.Count > 0) { if (_ds.Tables[0].Rows[0]["FLAG"].ToString() == "0") { flag = false; } } } return(Json(new { flag = flag }, JsonRequestBehavior.AllowGet )); }