public JsonResult GetNotifications() { var notificationRegisterTime = Session["LastUpdated"] != null?Convert.ToDateTime(Session["LastUpdated"]) : DateTime.Now; NotificationComponent NC = new NotificationComponent(); var list = NC.GetData(); Session["LastUpdate"] = DateTime.Now; return(new JsonResult { Data = list, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); //update session here for get only new added contacts (notification) }