Does a child action share the same ViewBag with its “parents” action?
I am confused with this: I have an action ,say Parent ,and in the corresponding view file ,I have called a child action ,say Child ,both Parent and Child actions are in the same controller. and I need the Child action and the Parent action to share some data in the ViewBag.Now ,what I should do ?Here is my question: when I call the Child action in parent's view file ,I pass the viewbag to it like this: @Html.Action(ViewBag). in my child action ,I do this: public PartialViewResult Child(Object ViewBag) { //using the data in ViewBag } Is this the right way ? Does the viewbag object passed by