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

前端 未结 16 1266
逝去的感伤
逝去的感伤 2020-11-28 08:24

I am trying to use ViewBag in my application, I have all of the recent dlls, the latest version of MVC 3, but yet I am still getting the Error:

\"The

16条回答
  •  爱一瞬间的悲伤
    2020-11-28 08:50

    If you use Visual Studio 2013 and you like use MVC 3, you get this error because Visual Studio 2013 does not support MVC 3 natively (even of you change ./Views/web.config), only MVC 4: https://msdn.microsoft.com/en-us/library/hh266747.aspx

提交回复
热议问题