protected void Page_Load(object sender, EventArgs e) { HtmlMeta meta = new HtmlMeta(); meta.Name = "keywords"; meta.Content = "ASP.Net, Web, meta tag"; Header.Controls.Add(meta); }
A expert on system architect with full SDLC and Agile development experience. Skills: , C# C++ Scrum OOA/OOD javascript ASP.Net MVC XML, HTML Web Service, RESTful, WCF, Android and etc. Email me if you need help on development.
Thursday, 25 August 2011
Dynamically add meta tags in ASP.Net
Add the following code to master page on the page_load event handler. All it does is to add a keyword meta tag to the header of the html page from server-side, which opens a door to all other possibilities.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment