Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

tag cloud (weighted list)

hi,
i am interested in finding out how to create a tag cloud (weighted list) in asp.net.
thanks.
[114 byte] By [mmingfeilam] at [2007-11-11 8:19:25]
# 1 Re: tag cloud (weighted list)
Please post ASP.NET questions to the ASP.NET forum.

I couldn't find an example online, but I would iterate through the list of tags adding them to a hashtable. If a tag is already present in the hashtable, increment its count. Finally, print the list of tags, using the count to set the font size of each tag.
Phil Weber at 2007-11-11 23:13:16 >
# 2 Re: tag cloud (weighted list)
Thanks for the reply, another question I have is if I do get a hash table algorithm to work, how do I get the results to look like this:

User1 user2 user3 user4

With datagrid and datalist, I only know how to display it this way:

User1
User2
User3
User4

In columns.

Also, this is my sql server 2000 db table (see attached doc), where each goal title is user specific. Do you think its better if I just do a count(username) who has the same goal title? Once I get those values back, I then put the values into a hashtable, and then display them. What do you think?

Thanks,
mmingfeilam at 2007-11-11 23:14:21 >
# 3 Re: tag cloud (weighted list)
Hi,

I have a working ASP.NET tag cloud sample on the Wingio Labs blog ( http://wingiolabs.blogspot.com) .The sample code is "slightly" documented.

Hope it helps!

Stefan
sbroenne at 2007-11-11 23:15:26 >