Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Life Time Of : ViewBag, TempData, ViewData and Session [closed]

Tags:

asp.net-mvc

These Are Useful to store Data. Session are destroyed by time that is set by webserver. Viewbag and ViewData work as view as work and destroyed while redirects. How about TempData? Or more useful information.

like image 633
Moslem7026 Avatar asked Jul 10 '15 05:07

Moslem7026


2 Answers

The lifetime of TempData is only available on the current Request and the subsequent Request.

You may want to read the article below.

http://rachelappel.com/when-to-use-viewbag-viewdata-or-tempdata-in-asp.net-mvc-3-applications

like image 67
Bon Macalindong Avatar answered Nov 03 '22 19:11

Bon Macalindong


Here Is Mechanism and more info Data-Passing-Mechanism-in-MVC-Architecture

like image 26
Moslem7026 Avatar answered Nov 03 '22 20:11

Moslem7026