Introduction
This is an ASP.NET server control that you can customize that will generate a keyword/search/tag cloud, given a DataSet
. Feel free to change the code to your purposes.
Example:
Background
This is the first release version. To view a demo and to download the current release, please see the project homepage.
Features
- Free source code or component-only.
- Generated by
DataSet
(use with XML, databases, or create programmatically etc.). - Optional two-color gradient cloud.
- Various font size units (em, px, pt, %).
- Max and min font sizes (in Hex format).
- Sort by a field name, ascending or descending.
- Customizable URL w/ variables.
- Customizable link title format w/ variables.
- Assignable CSS class.
- Ability to add custom HTML attributes to links (w/ variables).
- XHTML-valid and CSS-friendly.
Using the code
To use this component, you need to copy the SearchCloud.dll DLL file to your bin directory. Once it is copied, open up the page you plan to implement the Cloud in, and add this to the top:
<%@ Register assembly="SearchCloud" namespace="IntrepidStudios.SearchCloud" tagprefix="IS" %>
Then, implement the cloud by using this tag:
<is:cloud id="cloud1" runat="server" />
Before using it, you need to assign it a DataSource
and some field names. To do so, open the code-behind of your page and use this code to activate the control:
Dim ds As New DataSet
Cloud1.DataIDField = "keyword_id"
Cloud1.DataKeywordField = "keyword_value"
Cloud1.DataCountField = "keyword_count"
Cloud1.DataURLField = "keyword_url"
Cloud1.DataSource = ds
You have to have a DataSet
with keyword data to be able to use the control. This can come from a database, XML file, or anything that can be translated into a DataSet
.
Customize
For full details and an up-to-date documentation, please see the project homepage.
History
- [2-15-08] - Added to CodeProject.