Tag Archives: TempData.

Passing Data From a Controller to a View

In an MVC request processing model,Its very important to know how to pass data from MVC controller to view. In below we will discuss some following ways 1)ViewData 2)ViewBag 3)TempData 4)View Model Object 5)Strongly-typed View Model Object 1) ViewData: Its a simple way to pass data from controller to view to use “ViewData” property. ViewData… Read More »

ViewData, ViewBag and TempData in Asp.Net MVC

In order to pass data from controller to view and in next subsequent request, ASP.NET MVC framework provides different options i.e. ViewData, ViewBag and TempData. Both ViewBag and ViewData are used to to COMMUNICATE between controller and corresponding view. But this communication is only for server call, it becomes null if redirect occurs. So, in… Read More »