Home > DeveloperSection > Interviews > What is difference between ViewBag and ViewData in ASP.NET MVC?

Posted on    September-07-2011 1:17 AM

 ASP.NET MVC ASP.NET MVC 
Ratings:
 1 Answer(s)
  5562  View(s)
Rate this:

Chris Anderson
Chris Anderson

Total Post:197

Points:985
Posted on    September-07-2011 12:00 AM

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.


Don't want to miss updates? Please click the below button!

Follow MindStick