public JsonResult Event(Event rec) { Eventservices services = new Eventservices(); services.Event(rec); return(Json(new { msg = "save" }, JsonRequestBehavior.AllowGet)); }
public ActionResult Event(Event rec) { if (Session["admin"] != null) { Eventservices services = new Eventservices(); services.Event(rec); return Json(new { msg = "save" }, JsonRequestBehavior.AllowGet); } else { return RedirectToAction("Login", "Home"); } }