public string CommentPartialReplacer(CommentLink commentLink) { if (Request.IsAjaxRequest()) { _commentRepository.UpdateCommentStatus(commentLink.CommentID, commentLink.CommentStatus); return "Comment status has been updated"; } throw new NotSupportedException("Not an ajax request"); }
public ActionResult CommentPartial(CommentLink commentLink) { if (Request.IsAjaxRequest()) { _commentRepository.UpdateCommentStatus(commentLink.CommentID, commentLink.CommentStatus); var links = commentLink.GetLinks(); return PartialView("CommentPartial", links); } throw new NotSupportedException("Not an ajax request"); }