Skip to content

<xmod:DetailButton>

<xmod:DetailButton> renders a push-button that switches the parent template from list view to detail view. The supplied <Parameter> tags fill the parent's <DetailDataSource> parameters — the matching row is fetched and rendered inside the parent's <DetailTemplate>.

This tag is gated by the parent template's DetailRoles (defaulting to "everyone who can see the module"). Place it inside <ItemTemplate> or <AlternatingItemTemplate> so each row gets its own button with row-specific parameters.

Sibling variants

Example

html
<xmod:Template Id="Employees">
  <ListDataSource CommandText="SELECT EmployeeId, FirstName, LastName FROM Employees" />
  <DetailDataSource CommandText="SELECT * FROM Employees WHERE EmployeeId = @EmployeeId">
    <Parameter Name="EmployeeId" />
  </DetailDataSource>

  <ItemTemplate>
    <strong>[[FirstName]] [[LastName]]</strong>
    <xmod:DetailButton Text="View Profile">
      <Parameter Name="EmployeeId" Value="[[EmployeeId]]" DataType="Int32" />
    </xmod:DetailButton>
  </ItemTemplate>

  <DetailTemplate>
    <h1>[[FirstName]] [[LastName]]</h1>
    <h4>Biography</h4>
    <div>[[Bio]]</div>
  </DetailTemplate>
</xmod:Template>

Properties

PropertyValuesDefaultDescription
IDstringUnique identifier for the button
TextstringCaption displayed on the button
AjaxTrue FalseFalseWhen True, switches to detail view via async postback. Requires ID set (since v2.6)
CssClassstringCSS class name(s)
StylestringInline CSS
WidthsizeWidth of the button
HeightsizeHeight of the button
ToolTipstringHover tooltip
VisibleTrue FalseTrueShows or hides the button
OnClientClickJavaScriptClient-side script to run on click. Returning false cancels the action
AccessKeystringKeyboard shortcut character
EnabledTrue FalseTrueWhen False, the button 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

TagRequiredDescription
<Parameter>required (one per <DetailDataSource> parameter)Supplies the value for the matching <DetailDataSource> parameter

<Parameter>

Use one <Parameter> for each @param in the parent template's <DetailDataSource>. The values are typically field tokens that identify the row.

AttributeValuesDefaultDescription
Name *stringParameter name (matches @param in the DetailDataSource)
Valuestring | tokenParameter value. Field tokens like [[ID]] are typical
DataTypedatabase typeStringData type used when binding

Property Details

  • Ajax: When True, the detail view replaces the list view via async postback rather than a full page refresh. The button must have its ID property set for AJAX to work. The parent <xmod:Template> should also have Ajax="True".