State Management in ASP.NET MVC – ViewData, ViewBag and TempData in MVC. In ASP . NET MVC, ViewData, View Bag, TempData is used to maintain the state in our page/view . Viewdata, ViewBag is used to transfer date/information from controller to view in the current request.