【发布时间】:2014-08-07 07:41:12
【问题描述】:
我迁移了opensurce项目
http://surveymaster.codeplex.com
从 MVC 2 到 MVC 4
我现在有以下编译错误:
c:\inetpub\wwwroot\Views\SurveySession\Index.aspx(7,13): error CS1061: 'object' does not contain a definition for 'PageCount' and no extension method 'PageCount' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
c:\inetpub\wwwroot\Views\SurveySession\Index.aspx(12,38): error CS1061: 'object' does not contain a definition for 'Page' and no extension method 'Page' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
c:\inetpub\wwwroot\Views\SurveySession\Start.aspx(22,34): error CS1061: 'object' does not contain a definition for 'SurveyId' and no extension method 'SurveyId' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
c:\inetpub\wwwroot\Views\SurveySession\Start.aspx(23,30): error CS1061: 'object' does not contain a definition for 'Questions' and no extension method 'Questions' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
c:\inetpub\wwwroot\Views\SurveySession\Review.aspx(23,34): error CS1061: 'object' does not contain a definition for 'SessionId' and no extension method 'SessionId' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
第 7 行给出了错误:
Line 5: </asp:Content>
Line 6: <asp:Content runat="server" ID="Content1" ContentPlaceHolderID="MainContent">
Line 7: <% if(Model.PageCount.Equals(0)) {%>
Line 8: La moment nu sunt chestionare disponibile pentru dvs.
Line 9: <%}%>
如果需要,还有源码完整编译源
【问题讨论】:
-
你有一个名为 PageCount 的模型属性???
-
对不起,我是一个初学者,模型属性是这个截图右边的吗? db.tt/BH3WjnGH
-
没有具有 PageCount 名称的属性,这就是错误即将到来的原因..@carni89..
-
@carni89....如果答案可以帮助您解决问题,请点赞接受答案,这样它也可以帮助其他人..thankzzz...
-
您是否尝试过构建和运行未修改的解决方案?
标签: asp.net-mvc migration codeplex