public ActionResult Comment(string taskId) { if (_authorizationLogic.IsUserLoggedIn() && taskId != null) // this can also be done with a filter function { ViewBag.TaskId = taskId; //this should be put together with the comments in a common view Model in a real implementation return(View(_taskLogic.GetTaskComments(taskId))); } return(RedirectToAction("Index")); //Display message about the success of the delete }