mvc 3 to mvc 5 migration razor syntax issue [closed]

﹥>﹥吖頭↗ 提交于 2019-12-13 11:29:38

问题


We used official tutorial for upgradation, after following, we got no build errors, after running some functionalities are not working. We saw that some razor syntax were showing red as syntax error/some closing tag missing. what may be the reason

edit: The errors as below image
http://p.lui.li/img-40102_1_p-r-full.png
and another sample
http://p.lui.li/img-40102_2_p-r-full.png

there are still errors like div tag is not closed. All these codes were working fine in mvc3


回答1:


I have same problem yesterday when I convert my old 3.0 project to MVC 4. in 2013 ViewBag and something also not found in current context even it's work fine in browser.

Make a new app with same namespace and copy paste the stuff carefully. After doing this your project will work like a charm.



来源:https://stackoverflow.com/questions/20879307/mvc-3-to-mvc-5-migration-razor-syntax-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!