I have a MasterPage, several content pages - each of the content pages have a UserControl.
In the MasterPage, I'm setting the Page.Title programmatically based on Page_Init "Request.UserAgent.Contains....", so that the content pages end up with different page titles based on this.
Each content page has its Title set to blank (Title=" "), but when the page renders, the pragmatically generated page title shows up in the browser tab.
In the UserControl code behind, I need to access the content page's (parent page) Page.Title value, and base on this, display some text:
If(Page.Title == "something")
{
Lable.Text = "something";
}
else if (Page.Title == "somethingElse")
{
lable.Text = "somethingElse";
}
However, my label remains blank when using this code. What is the way I need to determine the current Page.Title to what the MasterPage has set it as?
C# Please