Strongly typed actionlink with asp.net mvc beta?

I used to be able to do the following in Preview 3

<%=Html.BuildUrlFromExpression<AController>(c => c.AnAction(par1, par2)%>

How can I create URLs in a strongly typed way using MVC beta? The only thing I found is

<%= Html.ActionLink("aName", "ActionName", "ControllerName")%>

It is not strictly typed off course.

+5
source share
2 answers

You need ASP.NET MVC beta futures, which is a separate download

ASP.NET MVC Beta Futures

then your source code will work as before.

See this message for it to work: SO message if there are no extensions

+5
source

Microsoft.Web.Mvcthe assembly provides extension methods for HtmlHelperthat allow something like

<%= Html.ActionLink<SomeController>(c => c.Index()) %>
+3

All Articles