I was creating a web-application for one of my clientele, where I was supposed to add Meta-Tags dynamically to ASP.NET page. This kind of worried me for some time. Then I thought, let me open up the Visual Studio 2005 IDE.
I was playing around in Object Browser with System.Web namespace when I found a new class…
Let me try, was my first thought and the results were beautiful.
/// Summary description for CommonFunctions
public static class CommonFunctions
public static void SetHeading(Page pg, string sHeading)
HtmlMeta meta = new HtmlMeta();
meta.Name = “keywords”;
meta.Content = “Company Name, products,” + “,” + sHeading ;
The site is now Search-Engine Optimized. The content can be changed dynamically!