Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing
Hi Friends, I am Divyang Panchasara. I am very much interested in Computer Science , Physics and maths and microsoft technology development
ViewData | ViewBag |
It is dictionary of name/value pair collection | It is dynamic type object |
This features exist since 1st release of ASP.NET MVC | This features available from ASP.NET MVC 3.0 |
This will work in ASP.NET with .net 3.5 framework and above | This will work well with ASP.NET 4.0 with .net 4.0 framework and above |
ViewData is faster compare to ViewBag | ViewBag is slower than ViewData |
While retrieving data from viewData in to view pages , one need to do proper type casting | While retrieving data from viewbag in to view pages , one need not to do type casting |
Hence it make code with lots of type casting fragments | Hence it make more clear code |
Definition | Explanation |
VM | View-Model |