Where can I register getters and setters for the properties of the object ViewBag?
ViewBag is a DynamicObject which essentially means that the properties and values are determined at runtime. The simplest explanation is that of a Dictionary<string, object>
.
ViewBag.Name = "Title";
and ViewDictionary["Name"] = "Title";
are essentially the same. As such there are no getters and setters for the ViewBag specifically. DynamicObjects.
What is it you're trying to accomplish?