![]() |
How to add meta tags asp.net ?
how to add meta tags asp.net
|
I tried doing the following as above : if( !IsPostBack ) { //Meta Tags. var metaTags = new HtmlMeta { Name = "W", Content = "Smart"}; Header.Controls.Add(metaTags); metaTags = new HtmlMeta { Name = "W.cg", Content = "afasfsa" }; Header.Controls.Add(metaTags); Gives me an error : Cannot modify controls collection. Your help would be appreciated
Online condom store in India || Buy Kamasutra and KS condoms |
Add below code in designer page
Now add below code to your .cs page Page.MetaKeywords = "keyword1, keyword2, keyword3"; Page.MetaDescription = "Example of new meta tag"; |
Thanks rizwan post for this.
|
All times are GMT -7. The time now is 12:59 PM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.