5

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

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

How am I supposed to create urls in a strongly typed way with the MVC Beta? The only thing so far I have found is

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

This is not strongly typed off course.

Haacked
  • 58,045
  • 14
  • 90
  • 114
Boris Callens
  • 90,659
  • 85
  • 207
  • 305

2 Answers2

5

You need the ASP.NET MVC Beta Futures, which is a separate download

ASP.NET MVC Beta Futures

then your original code will work as before.

See this post for getting it working: SO post on missing extensions

Community
  • 1
  • 1
Sam Mackrill
  • 4,004
  • 8
  • 35
  • 55
3

The Microsoft.Web.Mvc assembly provides extension methods to the HtmlHelper which allow something like

<%= Html.ActionLink<SomeController>(c => c.Index()) %>
hangy
  • 10,765
  • 6
  • 43
  • 63