Guy
Guy

Reputation: 67230

RenderPartial missing from Html Helper in ASP.NET MVC 2

I've just converted an application from MVC 1 to MVC 2 using the VS2010 wizard. Not found is the Html.RenderPartial which I have sprinkled around a number of views. I am guessing that this is something that I've done wrong because I see no mention of this as a breaking change in the white papers and docs. Everything I'm using is RTM/RTW and no beta or RC versions.

EDIT: On closer inspection it looks like all the extension methods on the Html class are missing so I guess that I'm missing an include somewhere but I can't find it yet so any suggestions welcome...

Upvotes: 0

Views: 521

Answers (2)

Carles Company
Carles Company

Reputation: 7216

What I did is to first convert from MVC1 to MVC2 with this. Then I used the Visual Studio 2010 to convert the project for 2010.

Most probably the Visual Studio wizard doesn't convert from MVC1 to MVC2.

Upvotes: 1

Artiom Chilaru
Artiom Chilaru

Reputation: 12201

I think the location of these extensions has been moved to a different assembly. Try adding a reference to System.Web.Mvc.Html, and I think it should cover it. Also make sure that VS has added the correct reference to the MVC library version 2, instead of the old v1 )

Upvotes: 3

Related Questions