none
the name 'viewbag' does not exist in the current context RRS feed

  • Question

  • Anyone out there having this issue? I have VS2015 Ent and this is what is happening:

    I have already added references, checked dependencies, edited the web.config files in the views dir.

    I am really frustrated, the solution works in debugging mode IIS express, when I deploy it shows the message:

    "the name 'viewbag' does not exist in the current context"  and does not render the page. 

    PLEASE HELP!!! I am beginning to lose patience and really not liking these VS BS Issues!!

    Thanks!

    Saturday, April 23, 2016 3:27 PM

Answers

  • Hi SharePointJuiceMan10,

    May be the MVC version you have installed currently could be the issue. Verify you have latest version of MVC, it may be Beta or pre-release version or not. You must uninstall previous versions of MVC and install the newer version. Check this thread.

    By the way, Please consider posting ASP.NET related questions to https://forums.asp.net/.
    You may get quicker and better responses there.

    Best Regards,

    Chris

    Monday, April 25, 2016 2:39 AM
    Moderator