Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 9, 2022, 2:04 PM EDT
Alkesh BijarniyaRank #237 · 10.4K reputationPosted Sep 9, 2022, 11:55 PM EDT
Vishal YelveRank #178 · 13.6K reputationPosted Sep 10, 2022, 2:25 AM EDT
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
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 9, 2022, 11:50 PM EDT
Rajeev KumarRank #1,334 · 1.3K reputationPosted Mar 3, 2023, 2:14 AM EST
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.