Possible Duplicate:
Modifying MVC 3 ViewBag in a partial view does not persist to the _Layout.cshtml
I'm trying to set a pageTitle from a PartialView
Here is my code:
PartialView template:
@{
((WebViewPage)WebPageContext.Current.Page).ViewBag.Title = "Page title";
}
_Layout.cshtml:
<title> @ViewBag.Title</title>
How to do this?