<xmod:AjaxLink>
<xmod:AjaxLink> renders a hyperlink that fires an AJAX request when clicked — same behavior as <xmod:AjaxButton>, just rendered as a link rather than a push-button.
Requires jQuery
The hosting page must include jQuery.
Sibling variants
<xmod:AjaxButton>— push-button<xmod:AjaxImage>— clickable image
Example
html
<xmod:Template Id="Employees">
<ListDataSource CommandText="SELECT * FROM Employees" />
<ItemTemplate>
<strong>[[FirstName]] [[LastName]]</strong>
<xmod:AjaxLink Text="Get Employee History"
Url='[[Join("~/GetEmployeeHistory.aspx?empid={0}",[[EmployeeId]])]]'
Target="#EmployeeHistory" />
</ItemTemplate>
</xmod:Template>
<div id="EmployeeHistory"></div>Properties
| Property | Values | Default | Description |
|---|---|---|---|
| Url * | URL | The URL to fetch via AJAX | |
| Target | jQuery selector | The element whose content is replaced by the response. Required unless OnSuccess is set | |
| Text | string | Caption displayed on the link | |
| LoadingImageUrl | URL | Image shown while the AJAX call is in flight | |
| LoadingCssClass | string | CSS class applied to the loading image | |
| OnSuccess | JS function name | JavaScript function called with response data instead of replacing Target | |
| OnError | JS function name | JavaScript function called on AJAX failure | |
| Method | get post | get | HTTP method used for the request |
| CssClass | string | CSS class name(s) | |
| Style | string | Inline CSS | |
| ToolTip | string | Hover tooltip | |
| Visible | True False | True | Shows or hides the link |
* Required property
Deprecated Properties (styling)
BackColor, BorderColor, BorderStyle, BorderWidth, Font-*, ForeColor — use CssClass or Style instead.
See <xmod:AjaxButton> for full property details.