Firstly, download and add a reference to the Digg.Com.dll
using Digg.Com;
To add the basic "Digg" button to your page, simply add the following control to which ever element you want it to display in.
Page.Controls.Add(new DiggButton());
To add options to the Digg button, you need to instantiate a new DiggButton and set the properties. This is useful if you want more than one Digg button on a particular page as you can override the url for each (e.g. on a blog where you have a number of posts).
DiggButton diggButton = new DiggButton();
diggButton.Url = "http://tr3v.net/blog";
diggButton.Bgcolor = "#FF0000";
diggButton.Bodytext = "Tr3v.net, microsoft .net controls, applications and tutorials";
Page.Controls.Add(diggButton);
This class is not provided or approved by Digg.com, I made it to add Digg buttons to my website and have made the code available so that others can benefit from it.
For further information on integrating with Digg, please visit
http://digg.com/tools/integrate
| Date | Version | Notes |
| 06/04/2008 | 1.0.0.1 | Updated - now inherits from System.Web.UI.Control Also added a new constructor to specify a url. |
| 10/03/2008 | 1.0.0.0 | Initial Build |