If I use a ViewBag that contains a strongly typed object, is there a way for MVC Razor to define (or apply this) so that all elements of this object appear in IntelliSense?
For example, let's say I have
ViewBag.Movies.Name ViewBag.Movies.Length
I know that movies have a Movie object type that has members Name and Length
class Movie { public string Name {get; set;} public string Length {get; set;} }
Can I somehow apply this as I do for the model
@model Transactions.UserTransactionDetails
To make movie members available at Razor?
source share