Search code examples
asp.net-mvc-3viewbag

Accessing Viewbag data in rendered Partial View


The question might be a likely duplicate of Can't access ViewBag in a partial view in ASP.NET MVC3, but it does not seem to categorically negate the possibility.

The issue is to Access ViewBag Data in partial View which is being called from within the View and is being passed a model e.g.

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

The the Action method for the main View from which this partial View is being called has a Viewbag property .. That Viewbag does not seem to be accessed with the Partial view.

Any help appreciated..


Solution

  • Thank you for the time..

    have found the solution in the following post

    MVC3 - Passing data beyond the model to Partial view

    Regards.