1
Reply

What is TempData/ViewData/ViewBag in MVC ?

Shashangka Shekhar

Shashangka Shekhar

Oct 04, 2015
705
1

    ViewData is a dictionary objects, requires typecasting ViewBag is a dynamic property,not requires typecasting TempData also a dictionary objectsViewData & ViewBag maintain data when you move from controller to view,becomes null when redirection occurs. TempData keeps the information for the time of an HTTP Request.

    Shashangka Shekhar
    October 04, 2015
    0