How can I pass parameters to an Action using Html.Action() in ASP.NET MVC?

Solution 1:

You could specify additional data in the RouteValues property like this.

Html.Action("ActionName","Controller", new { id = 1 })

Solution 2:

To add a little on this question, I am using ASP.Net MVC 5 and I could succeed to achieve this with this code:

@Html.Action("foo",new {parameter1=1})