Viewbag view data access in partial view

The question may be likely duplication. It is not possible to access the ViewBag in a partial view in ASP.NET MVC3 , but it does not seem to categorically deny the possibility.

The problem is the access of ViewBag data in a partial view, which is called from the view and passed to the model, for example.

 @Html.Partial("name", object); 

The Action method for the main view from which this partial view is called has the ViewBag property. That the ViewBag doesn't seem to be available with a Partial view.

Any help is appreciated.

+4
source share
1 answer

Thanks for the time.

found a solution in the next post

MVC3 - Transferring data outside the model to a partial view

Sincerely.

+1
source

All Articles