<xmod:AjaxImage>
<xmod:AjaxImage> renders a clickable image that fires an AJAX request when clicked — same behavior as <xmod:AjaxButton>, just rendered as an image rather than a push-button.
Requires jQuery
The hosting page must include jQuery.
Sibling variants
<xmod:AjaxButton>— push-button<xmod:AjaxLink>— hyperlink
Example
html
<xmod:Template Id="Employees">
<ListDataSource CommandText="SELECT * FROM Employees" />
<ItemTemplate>
<strong>[[FirstName]] [[LastName]]</strong>
<xmod:AjaxImage AlternateText="Get Employee History" ImageUrl="~/images/info.gif"
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 | |
| ImageUrl | URL | Path to the image file. Tilde (~) supported | |
| AlternateText | string | Alt text for screen readers and search engines | |
| 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 control |
* Required property
Deprecated Properties (styling)
BackColor, BorderColor, BorderStyle, BorderWidth, Font-*, ForeColor — use CssClass or Style instead.
See <xmod:AjaxButton> for full property details.