I have a partial view the returns an HTML5 video tag. I want to make it so the user can click on the video and MVC will invoke a custom action.
I tried this
@Html.ActionLink( Html.Partial("_MediaClipPreview", clip), "Details");
but it won’t compile as it says that my View does not have the right method: (“Park” is my Model class)
Compiler Error Message: CS1928: 'System.Web.Mvc.HtmlHelper<MvcTest.Models.Park>' does not contain a definition for 'ActionLink' and the best extension method overload 'System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, string, string)' has some invalid arguments
What is the correct way to wrap an action link around a partial view?
ActionLinkonly accepts text.To add HTML, you need to use a regular
<a>tag: