Skip to content

<xmod:ReturnButton>

<xmod:ReturnButton> renders a push-button that, when clicked, returns the user to the list view they were on before opening the detail. Place it inside <DetailTemplate> (or inside an <AddSuccessTemplate> / <EditSuccessTemplate> to dismiss the success message and return to the list).

The control has no parameters or commands of its own — clicking it simply pops the view stack and re-renders the previous list.

Sibling variants

Example

html
<xmod:Template Id="Employees">
  <ListDataSource CommandText="SELECT EmployeeId, FirstName, LastName FROM Employees" />
  <DetailDataSource CommandText="SELECT * FROM Employees WHERE EmployeeId = @EmpID">
    <Parameter Name="EmployeeId" Alias="EmpID" />
  </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>
    <div>[[Bio]]</div>
    <xmod:ReturnButton Text="Go Back" />
  </DetailTemplate>
</xmod:Template>

Properties

PropertyValuesDefaultDescription
IDstringUnique identifier for the button
TextstringCaption displayed on the button
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)

BackColor, BorderColor, BorderStyle, BorderWidth, Font-*, ForeColor — use CssClass or Style instead.