Reputation: 5468
How does ASP.NET MVC create controller instances for request? does it create different instances for different requests? if that so, does it mean ViewBag cannot be shared between actions in a controller although it is a member in controller?
Upvotes: 0
Views: 604
Reputation: 51654
Every request invokes its own controller instance. Therefore the ViewBag
is local to every single request as well.
Upvotes: 1