Thanks to a comment on this blog post, I found the solution.
Here's what the anonymous comment said:
I ran into this problem as well. Looked in Reflector and figured out why. Seems like this is a bug to me. On the setter, if the page has a Header control, then setting the Title property actually changes Header.Title, but if the _titleToBeSet property already has a value (mine does because I'm using localized resources) then it doesn't clear out the old value and the getter still returns _titleToBeSet instead of Header.Title.
So I just changed my code to return this:
return (Page.Header != null ? Page.Header.Title : null) ?? Page.Title;
So the solution is to use the following instead of Page.Title:
(Page.Header != null ? Page.Header.Title : null) ?? Page.Title;
Rate this post:
Comments
There are no comments yet. Be the first to leave a comment!