Question: why viewdata is faster than viewbag?
Answer: NET, ViewData allows you to store key-value pairs. ViewData requires type casting for complex data type and it is recommended to check for null values to avoid error. ... ViewData is faster than ViewBag. ViewBag: ViewBag also helps to maintain data when you move from controller to view.