0
我想實現這個標籤雲: http://thetagcloud.codeplex.com/Asp.net詞典 - 與數據庫替換硬編碼值的值
...我需要與那些來替換下面的硬編碼值我數據庫?
<%= 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}"
}) %>
我創建返回格式期望的字符串/ int或值的數據
SELECT Tag, COUNT(Tag) AS Counter
FROM dbo.CtagCloud
GROUP BY Tag
HAVING (COUNT(Tag) > 3)
ORDER BY Counter DESC
你可以發佈你的數據訪問代碼? – Oded 2010-05-27 14:14:56
我認爲您需要修改您的查詢,以便它返回與標籤相關的標識(58,45,36,24,13)以及標籤名稱和計數。 – 2010-05-27 14:20:35
嗨,我在下面添加了我的數據訪問代碼。 謝謝 – Melt 2010-05-27 19:22:55