Pass data from one view to another view in MVC?
How to pass data from one view to another view in MVC?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
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
Francis SusaimichaelRank #466 · 5.4K reputationPosted Feb 3, 2016, 3:07 AM EST
You can use "Session" object for this purpose. Ofcourse, you have other ways too like ViewData, TempData and ViewBag. But they are (ViewData and ViewBag) available only for the next request. TempData will avail still you read (if you want you can extend it's lifetime).
So, Session is best for your purpose.