An ASP.NET Developers Guide to Setting Meta Keywords


I was born in 1966. People born in the years 1946 to 1964 are often referred to as baby boomers. Boomers are the people that are retiring now and there are a lot of them. Generation X followed in from roughly 1964 to 1979, and Generation Y followed that group. The current generation including my children are referred to as generation Z; I refer to them as Generation 0 (or generation naught); I refer to them as the Naughties.

There are studies about how the time you were born can impact your life, maybe even significantly. (Checkout Malcolm Gladwell’s book Outliers for neat examples how the time you are born might make a big difference. Gladwell talks about the luck of timing as it pertains to people like Bill Gates and hockey players.)

Being born in 1966 means I am little too young to be a boomer and a little too old to be a really good generation Y. How this plays out in my life is funny. In 1992, I tried to sell something on the Internet when everything was text based and bulletin boards were all the rage. (There were no browsers, no HTML, no eBay, Google, Facebook or anything else.) Some entity sent back a note saying that the Internet “was not for commercial purposes” and they removed my product. My thought was if you can’t sell anything on Web than what good was it and ignored it for the next several years. (That’s why I didn’t get in on the Netscape IPO: I was turned off, tuned out, and didn’t care. Ooops!) This happens to me a lot. I am too early to the technology game or later than everyone else. I didn’t start texting until last year.

What is a relatively new phenomenon right now? Social networking, like Facebook, MySpace, and Search Engine Optimization (SEO) are relatively new and hot topics. Being Baby Boom-Y puts me squarely in the mindset of one who cares but not that much. I use Facebook, but not that much. I Twitter, am LinkedIn but I don’t feel compelled to troll these sites or even post every day. Yeah, I like reacquainting with old friends but quickly remember why I lost touch in the first place-we ran out of things to talk about, I am generally not that interested in which bar people are meeting in, or which whacked out Facebook thing my son is a fan of. I care but not that much.

Here is the rub: some things like SEO matter. If you want people to read your blog, subscribe to your service, find your website and buy your products then you must have a good, if not great web presence, and you have to know they will find your product or service through Yahoo, Bing, or Google. These entities use SEO to figure out who to list, in what order to return those listings, and the content of those listings. More importantly many people click the first link returned first and being first in most things is very, very important. Not only do you want to be first but you want to catch and grab the web surfer’s attention, get them to click through to your site and stay there. Staying on your site means you need a great Web presence. Slow sucks and no one is going to wait more than a second or two for your site to respond. If you don’t build your site correctly then they may never get there in the first place. This is where we come in. Helping search engines find you and your customers finding you through search engines can be enhanced by meta keywords and descriptions. .NET 4.0 makes improving the meta content that helps search engines easier.

Hedging Your Search Engine Odds With Meta Keywords and Descriptions

Meta content is invisible to the end user but is part of the page data. The meta data is placed in the header section of a page; it looks something like this:

<meta name=”keywords” content=”blogs, books, articles, consulting” />
<meta name=”description” content=”Paul Kimmel is a columnist, Blogger, book author, and technical Evangelist for Developer Express, Inc” />

For search engines that use this data the casual surfer’s odds of finding me might be improved if they search on any of the keywords, and the description returned by the search engine might include my description. Sort of create your own advertisement, be your own best marketing expert. What you put in these values is up to you, but something is better than nothing.

The problem is that this meta data is sometimes ignored or overlooked. In our social networking-crazed, search engine based world ignoring these simple helpers is done at some risk. In .NET 4.0 you can now fill these values out programmatically. The ASP.NET Page class–every Web page–has a MetaKeywords and MetaDescription property. By providing values for these properties with code you easily set search keywords and provide your own description, and you can do so dynamically. Listing 1 shows you just how easy this is to do. I hope I have convinced you not to ignore these simple but potentially critical features of Web development.

Partial Class _Default
   Inherits System.Web.UI.Page

 Protected Sub Page_Load(ByVal sender As Object,
   ByVal e As System.EventArgs) Handles Me.Load

   Page.MetaKeywords = “Sex, Drugs, and Rock and Roll”
   Page.MetaDescription = “Those three keywords/phrases should help people find my site”

 End Sub
End Class

Listing 1: Programmatically defining keywords and descriptions to enhance search engine results.

(A friend of mine just told me what the annual tuition at a state college was now. Maybe I should figure how to sell sex, drugs, and rock and roll on the Internet.)

Compile this simple example and view the rendered page’s HTML and you will see that the meta keywords and description match the programmatic content.


I heard on the news today that Washington State has a $3 billion budget deficit and is considering putting sin taxes on candy and bottled water. This is pretty significant because Washington State with Microsoft’s highly compensated 100,000 plus technology workers has to be becoming one of the states with the highest median income. That has to be a lot of tax revenue. Washington also has a lot of green taxes and governmental overhead. I know it is a non sequitir, but the economy is on everyone’s mind.

For me the answer seems to be more business ingenuity and less government. I have been an adult through 8 years of Reagan, 4 years of Bush the senior, 8 years of Clinton, and 8 years of ‘W”. It seems the economy has flourished when government regulation is less oppressive, socialism in most forms represents failed policies, and the Uncle Sam’s’ checkbook is kept in check. It is a good thing that we only have to worry about getting customers to find, view, and consume our products. Well, it would be nice if that was our biggest worry.

More by Author

Must Read