InterviewSolution
Saved Bookmarks
| 1. |
What is the difference between ViewBag and ViewData in ASP.Net MVC? |
|
Answer» ViewBag is a wrapper around ViewData, which allows to create dynamic properties. Advantage of viewbag over viewdata will be :In ViewBag no need to typecast the objects as in ViewData.ViewBag will take advantage of dynamic keyword which is introduced in version 4.0. But before using ViewBag we have to keep in mind that ViewBag is slower than ViewData. |
|