ViewBag Versus ViewData

Watch the first few minutes on us! If you'd like to watch the entire video and hundreds more like it, download code samples, access offline videos and skills assessments, and use the discussion forums, log in or purchase a subscription.


Bob Tabor


Throughout this series, I've used the ViewBag to pass data unrelated to the view model from the Controller's action result methods to the View. However, you may also see examples that use a different object called ViewData. This video explains how these objects work and what their relationship is.

Table of Contents

{{toc.Position}} {{toc.Text}}

Related Links

  • {{link.LinkText}} (requires a paid subscription)


This course is part of the following series: