I set the title of my master page so all of my content pages would have the same default title.

However, I wanted a couple of the pages to have a unique title. Is there a good way to do this? I know I could get it if I removed the title from the master page, but then I would always have to set a title. Is there an easier way to go about this?

Thanks

VS 2008, C#, ASP.NET 3.5

Recommended Answers

All 2 Replies

Don't know much about C# but with my little experience with PHP, maybe you can have conditionals in the master page that will prevent the page titles being inserted in some pages. For PHP, u can override these stuff in an included file. This is just to suggest something, i hope it gives some lead.

Try settings the default title in the master page. Then try using the Pre_Render event of the page that needs a different title to overwrite the default title. I think for this to work you need to have your <head> element marked as runat="server". And maybe the title element too. Try both ways, see which one works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.