C# ASP.NET MVC Basics Modeling and Presenting Data Using Strongly Typed Views

Zeljko Porobija
Zeljko Porobija
11,490 Points

Changing ViewBag to Model

So, we haven't changed ViewBag.Title = "Comic Book Detail" to Model.Title. Why is this so? Thnx in advance for your reply!

1 Answer

Steven Parker
Steven Parker
200,430 Points

:point_right: The ComicBook model doesn't have a Title property.

However, at the end of the video you linked to, this change is made:

Viewbag.Title = Model.DisplayText;