首页 新闻 会员 周边

The name 'model' does not exist in the current context

0
悬赏园豆:30 [已解决问题] 解决于 2014-12-19 16:54

编辑ASP.NET MVC项目时,View中的@model代码报错:

The name 'model' does not exist in the current context

请问如何解决这个问题?

dudu的主页 dudu | 高人七级 | 园豆:31007
提问于:2014-12-19 16:48
< >
分享
最佳答案
0

问题是web.config中的配置与MVC的版本不匹配引起的,但修改为正确的web.config之后,要关闭.cshtml文件再打开进行编译,才能解决问题。

dudu | 高人七级 |园豆:31007 | 2014-12-19 16:54
其他回答(1)
0
+小马哥++ | 园豆:906 (小虾三级) | 2014-12-19 16:54
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册