Mar
24
2013

SEO add meta tags dynamically in ASP.NET C#

Here is an example how to add meta tags such as page title, meta description, and meta keywords in asp.net C#.   namespace reference use: using System.Web.UI.HtmlControls; Add the following code into your (.aspx.cs) page: protected void Page_Load(object sender, EventArgs e) { // set page title Page.Title = "Welcome to Phi's Homepage - PhiBui.com"; //Page description HtmlMeta pagedesc = new HtmlMeta(); pagedesc.Name = "Description"; pagedesc.Content ="Phi Bui is Software Engineer & IT Professional in Louisville KY"; Header.Controls.Add(pagedesc); //page keywords HtmlMeta pagekeywords = new HtmlMeta(); pagekeywords.Name = "keywords"; pagekeywords.Content = "Programmer,ASP.NET,SEO,C#,C/C++,HTML/CSS,JavaScript/JQuery,MS SQL Database,MySQL Database,PostgreSQL"; Header.Controls.Add(pagekeywords); }

Calendar

<<  December 2020  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar