/**Add Meta Keyword**/ HtmlMeta metaKeywords = new HtmlMeta(); metaKeywords.Name = "keywords"; //Assign keywords//Note: Best SEO Practise says keywords should be less than 10. metaKeywords.Content = "SEO Practise, Asp.net"; Page.Header.Controls.Add(metaKeywords); /**Add Meta Keyword**/ HtmlMeta metaDesc = new HtmlMeta(); metaDesc.Name = "description"; //Assign description//Note: Best SEO Practise says meta description should be less than 150 characters metaDesc.Content = "SEO Practise in asp.net"; Page.Header.Controls.Add(metaDesc); OUTPUT You will find following two meta tags in Head Section of asp.net page <meta name="keywords" content="SEO Practise, Asp.net" /> <meta name="description" content="SEO Practise in asp.net" />
free tutorial for everyone .here anyone ask dotnet, asp.net, mvc, linq, entity framework question. discuss any problem related these topics. solution in 24 hours assure.preparation interview question in dotnet , asp.net .
Saturday, 16 June 2012
Code for How to add meta keywords and meta description in Asp.net
Labels:
Ado.net
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment