I want to be able to pass link to view from controller. Is there anything like Html.ActionLink on the server side?
Thank you for your help!
1 Answer
In your controller you can use Url.Action to generate a new url using actions, controllers and routevalues.
This will not return a <a> tag, but only the url, for you to use in your controller.
Html.ActionLinkis server side. Please refine the question.Modelparameter?<%: Html.ActionLink(supply.SupplyName, "Edit", new { id = supply.ID })%>. I want to pass it throughModel. LikeModel.MyLinkLinkExtensionsneeds the view context which you wont have at the controller point.