Phillip Quinlan
Phillip Quinlan

Reputation: 199

How do you dynamically change a DNN page title from a DNN module?

How do you dynamically set a DNN page title from a DNN module?

Upvotes: 1

Views: 846

Answers (2)

prisznitz
prisznitz

Reputation: 76

In MVC DNN Module put to your _Layout page

@{
     ((Page)HttpContext.Current.Handler).Title = ViewBag.Title;
 }

Upvotes: 0

Phillip Quinlan
Phillip Quinlan

Reputation: 199

Set Page.Title to a custom string. Note that you must do this in Page_PreRender

protected void Page_PreRender(object sender, EventArgs e)
{
    Page.Title = "Your new page name goes here";
}

Upvotes: 3

Related Questions