我需要根据_viewstart.chtml中的用户更改布局。我已经在问题Why can't _ViewStart.cshtml access the ViewBag object?中看到了答案,并且答案建议使用ViewContext.ViewBag,但是在mvc 5中我出现了错误
An object reference is required for the nonstatic field, method, or property
所以我如何使用_viewstart.chtml中的viewbag或ViewContext。