Interviews - C# Corner

Puneet Joshi
Explain the difference between Viewbag and Viewdata in ASP.NET MVC?
By Puneet Joshi in ASP.NET MVC onSep 09 2012
  • Ritesh Sharma
    Jun, 2014 7

    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.

    • 0
  • Jignesh Trivedi
    Apr, 2014 14

    Please refer my article

    • 0

Most Popular Companies

Most Popular Job Functions