开发者

Call to Render Partial not working after MVC 2

开发者 https://www.devze.com 2022-12-18 14:04 出处:网络
I was calling render partial like this in MVC 1.0: <% Html.RenderPartial(\"~/views/shared/categories.ascx\", ViewData.Model.Categor开发者_如何学编程ies); %>

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

精彩评论

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