Click here to Skip to main content
15,881,588 members
Articles / Web Development / ASP.NET
Article

ASP.NET Tag/Search Cloud Server Control

Rate me:
Please Sign up or sign in to vote.
3.65/5 (6 votes)
19 Feb 2008CPOL1 min read 46K   614   35   3
A customizable cloud generator written in VB.NET.

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:

SearchCloud.PNG

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:

ASP.NET
<%@ Register assembly="SearchCloud" namespace="IntrepidStudios.SearchCloud" tagprefix="IS" %>

Then, implement the cloud by using this tag:

ASP.NET
<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:

VB
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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Target
United States United States
Hi, I'm Kamran Ayub aka Kamranicus. I specialize in helping people build usable, reliable, and resilient technology solutions with a primary focus on web-based technology.

Comments and Discussions

 
QuestionPostback Pin
madrianr12-Nov-09 19:31
madrianr12-Nov-09 19:31 
QuestionSome problems occur to me Pin
blue300024-Aug-08 14:29
blue300024-Aug-08 14:29 
GeneralRight on! Pin
MaxGuernsey18-Feb-08 11:54
MaxGuernsey18-Feb-08 11:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.