开发者

Call to Render Partial not working after MVC 2

I was calling render partial like this in MVC 1.0:

<% Html.RenderPartial("~/views/shared/categories.ascx", ViewData.Model.Categor开发者_如何学编程ies); %>

Now after dropping MVC 2.0 .dll's, I am getting the error:

 CS1061: 'object' does not contain a definition for 'Categories' and no extension method 'Categories' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)

What changed?

Do I have to update my solution or anything going from mvc 1 to 2?


If you go here and download the release notes for MVC2 there is a section on upgrading an ASP.Net MVC 1.0 project to ASP.NET MVC 2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜