Digg It button User Control for ASP.NET

Posted by andy gaskell on Apr 7th, 2007

I came across Tuggo’s excellent diggIT plugin for WordPress and thought it’d be cool to make an ASP.NET User Control that provides similar functionality. The control is really easy to use.

Here’s the basic tag:

<uc1:DiggItButton  ID="DiggItButton"
                   runat="server"
                   Url="http://gaskell.org"
                   Title="Test title"
                   Body="Test body" />

You don’t need to set the Url, Title and Body properties in the tag, they are also available as public properties in the codebehind. The only property that is required to be set is the Url property – if you pass in the Title and/or Body, digg will pre-populate those fields. Digg also asks that you url encode your strings and this control handles that for you. Check out the code and sample page here.

You can view an example of the control here at gifninja. Enjoy!

One Response

  1. Shakeel Says:

    Just great! This simplest thing has helped me a lot.

    Look at http://www.23-degrees.com/blog.aspx to see this Digger in action.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.