You need to run an installer for asp.net mvc 1.1, which according to Phil's blog
"You’ll notice that the installer says this is ASP.NET MVC 1.1, but as the readme notes point out, this is really ASP.NET MVC
1.0 retargeted for Visual Studio 2010."
So is is possible that the System.Web.Mvc.HtmlHelper is different (1.0?) in the current version of Microsoft.Web.Mvc than what get's passed in (1.1?)?
Details:
OK, I've tried lots of things and when I debug I get:
Attempt #1:
Html.RenderAction("ListMenu", "ListNav", "Red") 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderAction' and the best extension method overload 'Microsoft.Web.Mvc.ViewExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string,
object)' has some invalid arguments
Attempt #2:
(Note... I could not pass in generics to quick watch so I created a class with one property...
PropertyHolder holder = new PropertyHolder() { highlightCategory = "Red" };)
Html.RenderAction("ListMenu", "ListNav", holder) 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MyListModel>>' does not contain a definition for 'RenderAction' and the best extension method overload 'Microsoft.Web.Mvc.ViewExtensions.RenderAction(System.Web.Mvc.HtmlHelper,
string, string, object)' has some invalid arguments
Attempt #3:
Html.RenderRoute(dictionary) 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MyListModel>>' does not contain a definition for 'RenderRoute' and the best extension method overload 'Microsoft.Web.Mvc.ViewExtensions.RenderRoute(System.Web.Mvc.HtmlHelper,
System.Web.Routing.RouteValueDictionary)' has some invalid arguments
Attemp #4:
Working in quick watch from the info above I verified that dictionary is the right version, i.e.: .NET 4 framework.
The Quick Watch on "dictionary.GetType()" returns AssemblyQualifiedName of "System.Web.Routing.RouteValueDictionary, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") I get this:
Microsoft.Web.Mvc.ViewExtensions.RenderRoute(this, dictionary) The best overloaded method match for 'Microsoft.Web.Mvc.ViewExtensions.RenderRoute(System.Web.Mvc.HtmlHelper, System.Web.Routing.RouteValueDictionary)' has some
invalid arguments
So is is possible that the System.Web.Mvc.HtmlHelper is different (1.0?) in the current version of Microsoft.Web.Mvc than what get's passed in (1.1?)?
And that I'll need to wait until the Microsoft.Web.Mvc is updated for this to work?
That was it. I downloaded the source, opened it in Visual Studio 2010, rebuilt the MvcFutures project (in release mode), copied the resulting Microsoft.Web.Mvc.dll to replace the older one... My application ran perfectly after that.
I hope this helps someone else.
Cheers - Karl
Marked as answer by kzachry on Jun 27, 2009 10:56 PM
Can you please advise where you found the source for Mvc 1.0 Futures? I'm running into the exact problem as you and I'd like to rebuilt the project (just like you did).
kzachry
Member
2 Points
4 Posts
Html.RenderAction(action, controller, routeValues) not working with MVC 1.1 and VS 2010?
Jun 27, 2009 06:45 PM|LINK
Everything else works fine, but for the page that I have Htlm.RenderAction I get the following error message:
"The controller for path '/List' coudl not be found or it does not implement IController."
The the code looks something like:
Html.RenderAction("ListMenu", "ListNav", new { highlightCategory = ViewData["CurrentCategory"] });
On the page that displays the list I'm trying to put a navigation menu in place to allow them to select different categories.
This code works fine on Visual Studio 2008, MVC 1.0, and Microsoft.Web.Mvc.
But it does not work with Visual Studio 2010, MVC 1.0, and Microsoft.Web.Mvc (I didn't see an updated version of the futures...)
Thanks - Karl
"VS 2010" "Futures" "MVC 1.1"
CodeHobo
All-Star
18647 Points
2647 Posts
Re: Html.RenderAction(action, controller, routeValues) not working with MVC 1.1 and VS 2010?
Jun 27, 2009 07:51 PM|LINK
Take a look at this
http://haacked.com/archive/2009/06/09/aspnetmvc-vs10beta1-roadmap.aspx
You need to run an installer for asp.net mvc 1.1, which according to Phil's blog
"You’ll notice that the installer says this is ASP.NET MVC 1.1, but as the readme notes point out, this is really ASP.NET MVC 1.0 retargeted for Visual Studio 2010."
Blog | Twitter : @Hattan
kzachry
Member
2 Points
4 Posts
Re: Html.RenderAction(action, controller, routeValues) not working with MVC 1.1 and VS 2010?
Jun 27, 2009 10:24 PM|LINK
Headline:
So is is possible that the System.Web.Mvc.HtmlHelper is different (1.0?) in the current version of Microsoft.Web.Mvc than what get's passed in (1.1?)?
Details:
OK, I've tried lots of things and when I debug I get:
Attempt #1:
Html.RenderAction("ListMenu", "ListNav", "Red") 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderAction' and the best extension method overload 'Microsoft.Web.Mvc.ViewExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string, object)' has some invalid arguments
Attempt #2:
(Note... I could not pass in generics to quick watch so I created a class with one property...
PropertyHolder holder = new PropertyHolder() { highlightCategory = "Red" };)
Html.RenderAction("ListMenu", "ListNav", holder) 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MyListModel>>' does not contain a definition for 'RenderAction' and the best extension method overload 'Microsoft.Web.Mvc.ViewExtensions.RenderAction(System.Web.Mvc.HtmlHelper, string, string, object)' has some invalid arguments
Attempt #3:
Html.RenderRoute(dictionary) 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.IEnumerable<MyListModel>>' does not contain a definition for 'RenderRoute' and the best extension method overload 'Microsoft.Web.Mvc.ViewExtensions.RenderRoute(System.Web.Mvc.HtmlHelper, System.Web.Routing.RouteValueDictionary)' has some invalid arguments
Attemp #4:
Working in quick watch from the info above I verified that dictionary is the right version, i.e.: .NET 4 framework.
The Quick Watch on "dictionary.GetType()" returns AssemblyQualifiedName of "System.Web.Routing.RouteValueDictionary, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") I get this:
Microsoft.Web.Mvc.ViewExtensions.RenderRoute(this, dictionary) The best overloaded method match for 'Microsoft.Web.Mvc.ViewExtensions.RenderRoute(System.Web.Mvc.HtmlHelper, System.Web.Routing.RouteValueDictionary)' has some invalid arguments
So is is possible that the System.Web.Mvc.HtmlHelper is different (1.0?) in the current version of Microsoft.Web.Mvc than what get's passed in (1.1?)?
And that I'll need to wait until the Microsoft.Web.Mvc is updated for this to work?
kzachry
Member
2 Points
4 Posts
Re: Html.RenderAction(action, controller, routeValues) not working with MVC 1.1 and VS 2010?
Jun 27, 2009 10:56 PM|LINK
That was it. I downloaded the source, opened it in Visual Studio 2010, rebuilt the MvcFutures project (in release mode), copied the resulting Microsoft.Web.Mvc.dll to replace the older one... My application ran perfectly after that.
I hope this helps someone else.
Cheers - Karl
johnnyo5
Member
10 Points
11 Posts
Re: Html.RenderAction(action, controller, routeValues) not working with MVC 1.1 and VS 2010?
Aug 16, 2009 11:33 PM|LINK
Hi kzachry,
Can you please advise where you found the source for Mvc 1.0 Futures? I'm running into the exact problem as you and I'd like to rebuilt the project (just like you did).
Thanks,
Johnny