My latest release at http://www.codeplex/nucleo also features a new Link control (in the Nucleo.Web.Controls namespace).  This control tries to integrate two kinds of links; clickable links which fire an event, and redirection links that navigate to another site.  The link control incorporates an enumeration to incorporate this: the ClickAction property of type LinkClickAction.  When set to FIreEvent, the client-side clicked event or server-side clicked event (depending on rendering mode set by the RenderMode property) of the control, whereas Redirect fires a Redirecting event.

The redirecting parameters can be set by establishing the NavigateUrl property.  This property specifies the location to redirect to.  Another option, Target, specifies whether to use a new window to open the link in, or the same window.  The link also specifies a NavigateUrlFormatString that you can use to do something like this:

<n:Link … NavigateUrl='<%# Eval(“Key”) %>’ NavigateUrlFormatString=”products.aspx?id={0}” />

When a format string is specified, the navigateurl property is injected in the format string, as a convenience option.  Only one format placeholder is available.  The server component also has helper methods to get the final values for text (which has Text and TextFormat properties), navigate url, and more.  The GetText, GetNavigateUrl, and GetTarget methods are convenience methods for extracting this information as the control would need for rendering.

These options can be changed on the client-side; each of the main properties (navigateUrl, clickAction, target, text, etc.) is available on the client except for the format strings.  So you can change the way the link reacts to clicks, change where it navigates to, and more.

var link = $find(“<%= l1.ClientID %>”);
link.set_text(“New Text”);

Note the refreshUI method; this is a method that’s used to perform the actual updates.  This is important because the UI changes won’t occur until that method calls.  The reason is because I created a batch method to perform these updates for performance reasons (updating on every setter would be cumbersome).