Nested ASP.NET Dynamically add Description and Keywords

Posted on Posted in C#, SEO

I’m have to add description and keywords Meta tag to my html header for search engine to utilize the meta tag analyze my website for ranking. I know that you can make ContentPlaceHolder in the master page of my site, here ( where you can make it build into your master page. But I don’t like it mess up my master page too much, therefore I programmed a public static class to be called and add the Meta tag to the child page on demand. Here I have my MetaGen.cs Class;

This is how you can access the MetaGen.cs in the child page, simply add the following line to the Page_Load() method.

This makes it so simple for me.