Frage im Vorstellungsgespräch bei SOTI

Difference between ViewBag and ViewData

Antworten zu Vorstellungsgespräch

Anonym

30. Apr. 2018

Viewbag uses properties, viewdata is an array. E.g: ViewBag.foo = foo, ViewData["foo"] = foo.

Anonym

29. Apr. 2019

ViewBag is dynamic and properties are accessed using . operator whereas ViewData is a Dictionary