'System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderPartial' - ASP.Net MVC

后端 未结 5 853
不思量自难忘°
不思量自难忘° 2021-01-17 23:37

I\'ve been trying to run ASP.Net MVC 1.0 on one machine, but can\'t get past this. I create a new MVC project (C#). It creates all the folders, views, controllers, models

5条回答
  •  -上瘾入骨i
    2021-01-18 00:00

    Since you are referencing it in your Code Behind (ie. Default.aspx.cs) you need to include the namespace at the top of the file.

    using System.Web.Mvc.Html;

    is the Namespace that includes the RenderPartial extension method.

提交回复
热议问题