Exemplo n.º 1
0
        // ReturnUrl
        #region ReturnUrl
        public static MvcHtmlString ReturnUrl(this HtmlHelper htmlHelper, string name = "ReturnUrl")
        {
            string returnUrl = null;
            var    req       = htmlHelper.GetHttpRequest();

            if (req != null)
            {
                returnUrl = req.FormData.Get(name) ?? req.QueryString.Get(name) ?? req.Headers.Get("Referer");
            }

            return(Hidden(htmlHelper, name, returnUrl));
        }