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

shravan dixit 0 Reputation points
2024-08-16T06:58:38.3766667+00:00

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

same issue showing on every html control like @Html.DropDownListFor(), @Html.ValidationMessageFor etc.

Please resolve the issue.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,480 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,103 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anvin Alias 0 Reputation points
    2024-08-20T09:18:28.1866667+00:00

    Has the issue been fixed? I came across the same problem, and it only got resolved after I updated my Visual Studio. There was an update available, so I went ahead and did that.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.