示例#1
0
        protected ActionResult RedirectToPage(ICommentResponseInfo response)
        {
            TempData["comment-response-info"] = response;
            var url = string.IsNullOrWhiteSpace(response.RedirectUrl)
                ? Referrer != null
                    ? Referrer.ToString()
                    : "~/"
                : response.RedirectUrl;

            return
                (Redirect(url + "#comments"));
        }
示例#2
0
 public static bool IsSuccess(this ICommentResponseInfo commentResponseInfo)
 {
     return(commentResponseInfo != null && commentResponseInfo.Type == CommentResponseType.Success);
 }