
Url.Action("Action", "Controller", null, Request.Url.Scheme);
How to include the following in the Form Action attribute?
1. Protocol(http:// or https://)
2. HostName
3. QueryString
4. Port
@{
var actionURL = Url.Action("Action", "Controller",
FormMethod.Post, Request.Url.Scheme)
+ Request.Url.PathAndQuery;
}
@using (Html.BeginForm("Action", "Controller", FormMethod.Post,
new { @action = actionURL }))
{
}