Html.ActionLink("LinkText", "Action", "Controller")
after I upgraded from Microsoft MVC Preview 5 to Microsoft MVC Beta 1.
The error message I got was
Compiler Error Message: CS1928: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'ActionLink' and the best extension method overload 'System.Web.Mvc.Ajax.AjaxExtensions.ActionLink(System.Web.Mvc.AjaxHelper, string, string, System.Web.Mvc.Ajax.AjaxOptions)' has some invalid arguments
This partially related discussion brought to my attention changes between Preview 5 and Beta.
http://stackoverflow.com/questions/211493/asp-net-mvc-beta-1-where-is-html-renderpartial
I had to add this to my web config instead of what I started with from Preview 5.
<namespaces>
<add namespace="System.Web.Mvc"/>
<add namespace="System.Web.Mvc.Ajax"/>
<add namespace="System.Web.Mvc.Html"/>
<add namespace="System.Web.Routing"/>
<add namespace="System.Linq"/>
<add namespace="System.Collections.Generic"/>
</namespaces>
No comments:
Post a Comment