ViewPage::ViewData Property
Gets or sets a dictionary that contains data to pass between the controller and the view.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
public: property ViewDataDictionary^ ViewData { virtual ViewDataDictionary^ get() sealed; virtual void set(ViewDataDictionary^ value) sealed; }
Property Value
Type: System.Web.Mvc::ViewDataDictionary^A dictionary that contains data to pass between the controller and the view.
Implements
IViewDataContainer::ViewDataThe controller can add key/values pairs to the view data. The data is then passed to the view when the view is rendered. The view can add to or change the data, which will be sent to the controller when the view is posted as part of a request.
Show: