I think TJ_at_ITJ was wrong. THe correct solution:
Run this on a child page:
SiteMasterPage mp;mp = (SiteMasterPage)Master;
mp.PageTitle = "Some Title";
and this should be on a master page:
public string PageTitle
{
get
{
return hdtitle.InnerText;
}
set
{
hdtitle.InnerText = value;
}
}
This is because by default all items are protected so you dont have any permission to access them from child page.
Hope this helps somebody.