What is the differnce between ViewBag and ViewData in asp.net MVC 3?
Which is the best to use with Razor view engine?
Differnce between ViewBag and ViewData in asp.net MVC 3?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Dorababu MekaRank #457 · 5.5K reputationPosted Jul 1, 2011, 4:02 AM EDT
http://weblogs.asp.net/hajan/archive/2010/12/11/viewbag-dynamic-in-asp-net-mvc-3-rc-2.aspx
Viewbag achieves the same goal as viewdata and should be avoided in favor of using strongly typed view models (the same way as viewdata should be avoided).
So basically it replaces magic strings:
with magic properties:
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 1, 2011, 4:32 AM EDT
refer this link:
Link(viewbag and view data)
you will definitely get an idea........