Passing a value in HREF in a Razor view in ASP.Net MVC3
<a href="@(Html.MyActionHref(controllerName: "MyController", actionName: "MyAction"))"> The line above creates a hyperlink to represent Razor. The html helper method MyActionHref () creates a link. When you click on the link, it calls the action method from the controller. Now suppose that the action controller method that calls this connection is parameterized, i.e. public ActionResult MyAction(string myParams){}
(The html helper method MyActionHref () is even overloaded to accept three parameters respectively.)
How can this additional parameter be passed to the controller action method from the model?
Let's say
<a href="@(Html.MyActionHref(controllerName: "MyController", actionName: "MyAction",params: new {....} }))"> Any suggestions?