WHAT IS DIFFERENCE BETWEEN VIEWBAG AND VIEWDATA IN ASP.NET MVC?

Chris Anderson

Total Post:197

Points:985
Posted by  Chris Anderson
 6066  View(s)
Ratings:
Rate this:
  1. Chris Anderson

    Post:197

    Points:985
    What is difference between ViewBag and ViewData in ASP.NET MVC?

    The basic difference between ViewData and ViewBag is that in ViewData instead creating dynamic properties we use properties of Model to transport the Model data in View and in ViewBag we can create dynamic properties without using Model data.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!