Why and how to avoid ViewBag and ViewData in ASP.NET MVC
It could be so easy: When passing data from the Controller to the View in MVC one can simply use ViewBag.MyProperty = “ThisIsTheContentOfMyProperty”; or ViewData["MyProperty"] = MyProperty; And in the view you can access the data with: READ MORE