Sunday, 17 May 2009

ASP.NET MVC v1.0 - Generic Html.ActionLink(...)

... was removed for release of version 1.0.

This has been documented in about a million other places, but not many posts reference where to get the 'ASP.NET MVC v1.0 Futures' DLL (as opposed to the BETA Futures).

It's here:

You need this DLL if you want to use the generic version of the ActionLink - which can be used like this:


<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Bernard.Controllers"%>
<%@ Import Namespace="Microsoft.Web.Mvc"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

            <%= Html.ActionLink<MyController>(c => c.Index(), "MyStuff")%>



As per the above example - remember to throw the additional 'import' statement in ...

No comments:

Post a Comment

Migrating (and Open-Sourcing) an Historical Codebase: SVN-to-Git

I have a SVN repo on my local machine that I have been shoving stuff into since before I knew how to use revision control systems properly (...