In this article, you will learn about ViewData, ViewBag, and TempData in ASP.NET MVC.
Introduction In this article, I will explain about ViewData, ViewBag, and TempData while working in MVC. ASP.NET MVC provides quite a few ways of transferring the data from Controller to View.
ViewBag ViewBag transfers the data from the Controller to the View.
ASP.NET MVC 5: A Beginner’s Guide