Editing Meta Tags From Code Behind


/ Published in: VB.NET
Save to your folder(s)

Dynamically change the content of meta tags from the code behind. This allows you to feed the meta tags with content from a database or other dynamic content.


Copy this code and paste it in your HTML
  1. ' In your aspx source code do:
  2.  
  3. <meta id="metaDescription" name="description" content="" runat="server" />
  4.  
  5. ' In your aspx code behind do:
  6.  
  7. metaDescription.Content = "Description goes here"

URL: http://codefinds.blogspot.com/2007/11/editing-meta-tags-from-code-behind.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.