Skip to content

<xmod:AddImage>

<xmod:AddImage> renders a clickable image that opens the AddForm — same behavior as <xmod:AddButton>, just rendered as an image rather than a push-button.

Sibling variants

Example

html
<xmod:Template Id="Employees">
  <ListDataSource CommandText="SELECT * FROM Employees WHERE DepartmentId = @DepartmentId">
    <Parameter Name="DepartmentId" Alias="DepartmentId" />
  </ListDataSource>
  <ItemTemplate>
    <strong>[[FirstName]] [[LastName]]</strong>
  </ItemTemplate>
  <FooterTemplate>
    <xmod:AddImage AlternateText="New Employee" ImageUrl="~/images/add.gif" />
  </FooterTemplate>
</xmod:Template>

Properties

PropertyValuesDefaultDescription
IDstringUnique identifier for the image button
ImageUrlURLPath to the image file. Tilde (~) supported
AlternateTextstringAlt text for screen readers and search engines
ImageAlignNotSet Left Right Baseline Top Middle Bottom AbsBottom AbsMiddle TextTopNotSetImage alignment relative to surrounding content
AjaxTrue FalseFalseWhen True, opens the AddForm via async postback. Requires ID set (since v2.6)
Formform nameOverride the configured AddForm with a different form (since v4.7)
CssClassstringCSS class name(s)
StylestringInline CSS
WidthsizeWidth of the image
HeightsizeHeight of the image
ToolTipstringHover tooltip
VisibleTrue FalseTrueShows or hides the control
OnClientClickJavaScriptClient-side script to run on click. Returning false cancels the action
AccessKeystringKeyboard shortcut character
EnabledTrue FalseTrueWhen False, the control is disabled
TabIndexintegerTab order for keyboard navigation
Deprecated Properties (styling)
PropertyDescription
BackColor / BorderColor / BorderStyle / BorderWidthUse CssClass or Style instead
Font-Bold / Font-Italic / Font-Names / Font-Overline / Font-Size / Font-Strikeout / Font-UnderlineUse CssClass instead
ForeColorUse CssClass or Style instead

Child Tags

Same as <xmod:AddButton> — optional <Parameter Name Value DataType> tags pass values into the AddForm's <SelectCommand>.

See <xmod:AddButton> for full property and behavior details — <xmod:AddImage> differs only in being rendered as an image with ImageUrl/AlternateText/ImageAlign instead of Text.