I have a fairly simple question: Is ViewBag an ugly solution?
I have the option to add an extra property to my viewmodel to store the simple int
in and the option to pass the integer to the view by storing it in ViewBag. ViewBag is obviously much simpler, especially since i don't have to reuse the integer and only need it once in the whole process.
In my opinion though, Viewbag is an extremely ugly solution. Is just seems so clunky and amateuristic.
Is it really? Or is it a really acceptable solution to a problem like this?