Interviews2 answers
Explain the difference between Viewbag and Viewdata in ASP.NET MVC?
Puneet Joshi
Posted Sep 9, 2012, 7:22 PM EDT2 Answers
ViewBag is a dynamic property(introduced in C# 4.0) where as ViewData is a dictionary object. Both are used for same purpose for passing data from controller to view.
ViewBag since it is a dynamic property does not require boxing and unboxing because of its dynamic nature where as ViewData requires that.
Ritesh SharmaPosted Jun 7, 2014, 8:09 AM EDT
Please refer my article
http://www.c-sharpcorner.com/Blogs/12427/
Jignesh TrivediPosted Apr 14, 2014, 12:26 AM EDT

