What I'd like to do seems pretty simple. I'd like to specify the page title in my @Page directive on a view, like so:
<%@ Page Title="About This Site" ... %>
Then, I'd like to get that page title into the ViewData, so that it could be used in the master page, like:
<head>
<title>The Awesome Site | <%=ViewData["Title"]%></title>
And also in the View itself like:
<h1><%=ViewData["Title"]%></h1>
I am already inheriting a custom controller for all of the page controller methods. So I'm hoping that there's something I can do in the controller to transfer the Page.Title property into the ViewData (or maybe I'll use the ViewBag). I just can't seem to find any route to reference the Page from within the Controller.
Is this possible? Is there a different approach I might want to consider.