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.
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
Here Is Mechanism and more info Data-Passing-Mechanism-in-MVC-Architecture
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With