<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
<xmod:DetailImage>— same behavior, rendered as a clickable image<xmod:DetailLink>— same behavior, rendered as a hyperlink
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>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Properties
| Property | Values | Default | Description |
|---|---|---|---|
| ID | string | Unique identifier for the button | |
| Text | string | Caption displayed on the button | |
| Ajax | True False | False | When True, switches to detail view via async postback. Requires ID set (since v2.6) |
| CssClass | string | CSS class name(s) | |
| Style | string | Inline CSS | |
| Width | size | Width of the button | |
| Height | size | Height of the button | |
| ToolTip | string | Hover tooltip | |
| Visible | True False | True | Shows or hides the button |
| OnClientClick | JavaScript | Client-side script to run on click. Returning false cancels the action | |
| AccessKey | string | Keyboard shortcut character | |
| Enabled | True False | True | When False, the button is disabled |
| TabIndex | integer | Tab order for keyboard navigation |
Deprecated Properties (styling)
| Property | Description |
|---|---|
| BackColor / BorderColor / BorderStyle / BorderWidth | Use CssClass or Style instead |
| Font-Bold / Font-Italic / Font-Names / Font-Overline / Font-Size / Font-Strikeout / Font-Underline | Use CssClass instead |
| ForeColor | Use CssClass or Style instead |
Child Tags
| Tag | Required | Description |
|---|---|---|
<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.
| Attribute | Values | Default | Description |
|---|---|---|---|
| Name * | string | Parameter name (matches @param in the DetailDataSource) | |
| Value | string | token | Parameter value. Field tokens like [[ID]] are typical | |
| DataType | database type | String | Data 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 itsIDproperty set for AJAX to work. The parent<xmod:Template>should also haveAjax="True".