Fresh Click Media

Web and Software Development

February 22, 2008
by shane
59 Comments

Gravatar ASP.NET Control

I just got myself a freshclickmedia.com Gravatar over at gravatar.com. A Gravatar is a little avatar associated with an email address, and quite a few blogs use them to decorate post comments. Signing up is easy – all you need to do is supply an email address, and image, and give your image a content rating.

The source of the gravatar image tag points to gravatar.com’s image generator and includes an MD5 hash of the email address to prevent email harvesting. A ‘max rating’ parameter prevents the display of unsavoury content.

There are a wide number of blogging gravatar plugins, so I decided to write an ASP.NET custom control to do the job. Here I present the control and its features.
Continue reading

November 14, 2007
by admin
0 comments

C#’s null coalescing operator

I’ve been programming in C# for about five years, and today whilst reading the C# language specification v3.0, came across the null coalescing operator. Much like T-SQL’s ISNULL function, the operator replaces null values with the specified replacement value.