When to use ViewBag, ViewData, or TempData in view. In the controller i want to send object to the view.I want to know that which will be best in this case. I want the objec
IMHO for decent design practies -
ViewBag = never. ViewData = never. These are magic string-ish based fields and canot be caught during any compile time instances either.
Your VieWModel should contain everything it needs. Thats it's purpose in life. Don't devoid it of its purpose. TempData for status messages only or object you don't want to cache but wan't available for the very next request only.