ControllerBase.ViewBag Property (System.Web.Mvc)

Switch View :
ScriptFree
.NET Framework Class Library
ControllerBase.ViewBag Property

Gets the dynamic view data dictionary.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
Syntax

Visual Basic (Declaration)
Public ReadOnly Property ViewBag As Object
Visual Basic (Usage)
Dim instance As ControllerBase
Dim value As Object

value = instance.ViewBag

C#
public Object ViewBag { get; }
Visual C++
public:
property Object^ ViewBag {
	Object^ get ();
}
JScript
function get ViewBag () : Object

Property Value

Type: System.Object
The dynamic view data dictionary.
See Also

Reference