I'm trying to implement this tag cloud: http://thetagcloud.codeplex.com/
...and I need the replace the hard-coded values below with those coming from my database?
<%= new TagCloud( new Dictionary<string, int> {
{"C#", 58},
{"ASP.NET", 45},
{"VB.NET", 36},
{"AJAX", 24},
{"LINQ", 13}
},
new TagCloudGenerationRules
{
TagToolTipFormatString = "Tag weight: {0}",
TagUrlFormatString = "search.aspx?p=1&tag={0}"
}) %>
I've created the following sql string which returns the data in the format expected string/int or value/key
SELECT Tag, COUNT(Tag) AS Counter
FROM dbo.CtagCloud
GROUP BY Tag
HAVING (COUNT(Tag) > 3)
ORDER BY Counter DESC