KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a controller calling a view. In the view there is a PartialView called be @Html.Partial("ViewName", model). This works fine. But in the controller I wish to put something in the viewbag what would be hard to put in the viewmodel I pass to the view. The main view have no problem accessing the ViewBag , but in the PartialView it does not return anything. Is it possible to use the ViewBag in this case or should I "hack" this data into the model I pass to the view (and the model I pass to the PartialView , and the model I pass to the PartialView nested in the first PartialView )?
Tags (comma-separated)
Save Edits
Cancel