public ActionResult Add_New_Comment(Comment comment) { if (!ModelState.IsValid) { Topic topic = repository.Get(comment.TopicID); AddingCommentViewModel adding = new AddingCommentViewModel(); adding.topic = topic; return(View("Add_New_Comment", adding)); } //string UserId = User.Identity.GetUserId(); string UserId = GetUserId(); repository.Add_Comment(comment, UserId); return(RedirectToAction("Go_To_Topic", new { controller = "Topic", action = "Go_To_Topic", id = comment.TopicID })); }