Reputation: 514
How can I change page title from module razor code? I have news module on page site.name/news, and it is called with news id eg.: site.name/news/newid In this page I display different news and I also want to set different html title for each of this pages. How can I do this?
Upvotes: 1
Views: 162
Reputation: 5638
this works, another option is to do it through JS
advantages
disadvantage
Upvotes: 1
Reputation: 514
I already find the answer here: https://sexycontent.codeplex.com/discussions/547134
@{
var page = (Page)HttpContext.Current.Handler;
page.Title = "Sample";
}
Upvotes: 1