ASP.NET Meta Keywords and Description

Posted by Ben Griswold on Johnny Coder See other posts from Johnny Coder or by Ben Griswold
Published on Tue, 05 Jan 2010 17:11:23 +0000 Indexed on 2010/03/18 22:11 UTC
Read the original article Hit count: 633

Filed under:
|
|

Some of the ASP.NET 4 improvements around SEO are neat.  The ASP.NET 4 Page.MetaKeywords and Page.MetaDescription properties, for example, are a welcomed change.  There’s nothing earth-shattering going on here – you can now set these meta tags via your Master page’s code behind rather than relying on updates to your markup alone.  It isn’t difficult to manage meta keywords and descriptions without these ASP.NET 4 properties but I still appreciate the attention SEO is getting.  It’s nice to get gentle reminder via new coding features that some of the more subtle aspects of one’s application deserve thought and attention too. 

For the record, this is how I currently manage my meta:

  1. <meta name="keywords"
  2.     content="<%= Html.Encode(ConfigurationManager.AppSettings["Meta.Keywords"]) %>" />
  3. <meta name="description"
  4.     content="<%= Html.Encode(ConfigurationManager.AppSettings["Meta.Description"]) %>" />

All Master pages assume the same keywords and description values as defined by the application settings.  Nothing fancy. Nothing dynamic. But it’s manageable.  It works, but I’m looking forward to the new way in ASP.NET 4.

© Johnny Coder or respective owner

Related posts about ASP.NET

Related posts about ASP.NET MVC