I have the default _ViewStart.cshtml in my /Views folder. I'd like to be able to access my ViewBag object so I can set the default title for all my views.
However, with:
@{
Layout = "~/Views/Shared/SiteLayout.cshtml";
ViewBag.Title = "bytecourse - Online Courses in Technology";
}
I get "The name 'ViewBag' does not exist in the current context" as a runtime error.
What do I need to do?