diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs index 4d30164d31..f6da54c482 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs @@ -769,19 +769,7 @@ namespace Microsoft.AspNet.Mvc.Rendering // parameters. Also reachable in the even-more-unusual case that user called another BeginForm() // overload with default argument values. var request = ViewContext.HttpContext.Request; - if (request.Path.HasValue) - { - formAction = request.Path.Value; - } - else - { - formAction = string.Empty; - } - - if (request.QueryString.HasValue) - { - formAction += request.QueryString.Value; - } + formAction = request.PathBase.Add(request.Path).Add(request.QueryString); } else {