public ActionResult Save(FormCollection fc) { if (fc["groupid"] == null || fc["groupid"] == "") { Account_group t = new Account_group(); Boolean res = t.InsertAccount_group(fc); if (res) { return(Content("Record Inserted Successfully")); } else { return(Content("Error Adding Record Try Again")); } } else { Account_group t = new Account_group(); Boolean res = t.UpdateAccount_group(fc); if (res) { return(Content("Record Edited Successfully")); } else { return(Content("Error Editing Record Try Again")); } } //return PartialView("SaveRec"); }