Hyperlinking in task results
At the User Conference, some of you asked how to include hyperlinks in your task results. This is useful if your features have corresponding web sites. You want users to be able to click directly on a hyperlink from a field in the results panel instead of typing the URL in a browser.
There are two ways to approach hyperlinking. If you don’t want to add any custom code to your application, you can add a field to the feature class that stores the complete HTML for the hyperlink. You should include the tag, attributes, and text for the hyperlink, like this:
<a href=http://www.esri.com target=_blank>ESRI</a>
This is how it would look in the ArcMap table view:
This will create the following result in the ADF for a task result. You don’t have to do anything extra to create the link; the HTML gets interpreted automatically:

Clicking this link will open http://www.esri.com.
The second way to create a hyperlink in the task results is to construct the hyperlink programmatically with existing attribute content. The example below shows one way to do this with the Query Attributes task. You’ll need to subclass the out-of-the-box query task and override the ExecuteTask method to get access to the result dataset from the query (available via the Results property).
public class CustomQueryTask: QueryAttributesTask
{
public override void ExecuteTask()
{
base.ExecuteTask();
if (Results is System.Data.DataSet)
{
System.Data.DataSet dataset = (System.Data.DataSet)Results;
System.Data.DataTable datatable = dataset.Tables[0];
foreach (System.Data.DataRow datarow in datatable.Rows)
{
string val = (string)datarow["CNTRY_NAME"];
string updatedval = "<a target='_blank' href='http://www.google.com/search?q=" + val + "' >" + val + "</a>";
datarow["CNTRY_NAME"] = updatedval;
}
}
}
}
The results of the above code might appear like this in the TaskResults control at runtime:

For an additional example of hyperlinking in task results, see
Tom Brenneman’s sample on ArcScripts.
-Sterling Quinn, with Derek Weatherbe and Rex Hansen