public JsonResult GetActivities() { ActivityServices service = new ActivityServices(); int loggedInUser =Convert.ToInt16(SessionManagement.GetValue("UserId")); if (loggedInUser > 0) { return Json(service.GetAllActivities(loggedInUser), JsonRequestBehavior.AllowGet); } else { return Json("", JsonRequestBehavior.AllowGet); } }