//[HttpPost] public ActionResult PostComment(int id, string id2) { if (Session["userId"] == null) { throw new Exception("uiuiui"); } //return new ContentResult() { Content = "Not Logged in" }; string usernameString = Session["userId"].ToString(); //String text = comment.comment; int discriminator = int.Parse(usernameString.Split('-')[0]); string username = usernameString.Split('-')[1]; //int id = comment.video; CommentBll commentBll = new CommentBll(); int CommentId = commentBll.CreateComment(id, usernameString, id2); List <MVCPAP.Models.Comment> comments = commentBll.GetCommentsByVideoId(id); VideoBll videoBll = new VideoBll(); //return View("Video", videoBll.GetVideoDataById(id)); return(new ContentResult() { Content = CommentId.ToString() }); }