Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am looking for the best way to set a variable in the master layout, and then access it in all of its children. I tried ViewBag but it didn't work.
You can pass data as a model to a partial view from the master template.
Hi Alex. Thanks.
But I render the child as RenderBody() and not as a partial view. Is there a way to share the variable with it?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted