I am using @Html.ActionLink("Home", "Home") to currently pass back to “Home” when clicked. However, is it possible to get the page to perform a post on itself (i.e. Hit its post event in the controller) when the action link is clicked.
I basically need a method of navigating to a page, but first submitting all the current pages data into the model.
Note: Forgot to add that the ActionLink is inside a partialView on the page
You can use the
AjaxHelpermethodActionLink()to submit aPOSTof the current page. And then for yourHttpPostaction method in your controller, just do a redirect toHome.Something like this:
Your View
Your Controller