Is it possible to dive deep into objects stored in the ViewBag when using SSVE?
I have a "User" object placed on the ViewBag as such:
context.ViewBag.User = new { UserName = userByCookie.UserName };
When I try to access the UserName property from SSVE as such:
@Context.ViewBag.User.UserName
I get the error message:
model must be a standard type or implement IDictionary Parameter name: model
However; I when I access the "User" in SSVE as such:
@Context.ViewBag.User
I end up with the following output in my SSVE view:
{ UserName = Eric }
Can I access the sub-properties of a viewbag object when using SSVE?
Phillip Haydon, @philliphaydon, answered this question via Twitter:
Sorry, it doesn't support depth. :(