I have a controller calling a view. In the view there is a PartialView
called be @Html.Partial(\"ViewName\", model).
This works fine.
But i
In a comment TehOne said:
I know this is a bit old, but for future reference, I solved this by using ViewContext.Controller.ViewBag.Property. Of course this means that the ViewBag property you are trying to access was set in the controller, but I think that is a common enough case.
Which is what worked for me.