Different between viewBag, viewdata and tempdata in MVC
Loading
Different between viewBag, viewdata and tempdata in MVC
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeesh MenothPosted Sep 9, 2022, 6:04 PM
Rajeev KumarPosted Mar 3, 2023, 7:14 AM
Hi Naresh
ViewBag and ViewData are used to pass the data from Controller action to View.
TempData is used to pass the data from action to another action or one Controller to another Controller.
Vishal YelvePosted Sep 10, 2022, 6:25 AM
Please refer below links
https://www.dotnettricks.com/learn/mvc/viewdata-vs-viewbag-vs-tempdata-vs-session
Shivprasad Koirala sir's video
https://youtu.be/yq1N7zfZTBo
Alkesh BijarniyaPosted Sep 10, 2022, 3:55 AM
Rajanikant HawaldarPosted Sep 10, 2022, 3:50 AM