Meta Tags With Master Page

Est. Read Time: ~Keurig Brew-Time

Not long ago one of our clients needed some special Meta tags on a few of their pages.  Like Vladimir and Estragon, they anxiously awaited those tags. Needless to say, these tags, unlike Godot, were quick to make an appearance.Their site was developed using Visual Studio 2005 and made extensive use of several master pages.  Rather than creating new master pages for each of the meta tag sets, I wanted to be able to set the meta tags within the confines of the existing master page. So, I went to Google and found a few links that showed me the way.

ASP.Net 2.0 – Master Pages: Tips, Tricks, and Traps

Specifying the Title, Meta Tags, and Other HTML Headers in the Master Page

Using Meta Tags with Master Pages in ASP.NET

I used the “Header Place Holders” method described in the  Tips, Tricks and Traps link.  This enabled me to add the Meta tags to the content page without creating code behinds for each page.