<xmod:AjaxButton>

The AjaxButton tag renders as a push-button at run-time that, when clicked, will dynamically insert HTML returned from a URL into an element on the page - without a postback. This is a jQuery based control. It required jQuery be included in the page and that Javascript be enabled in the end-user's browser.

Syntax

<xmod:AjaxButton
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    LoadingCssClass="CSS class name"
    LoadingImageUrl="string"
    OnError="string - JS function to call on error"
    OnSucess="string - JS function to call on success"
    Style="string"
    Target="jQuery element selector"
    Text="string"
    ToolTip="string"
    Url="url"
    Visible="True|False"
    Width="size" />

Remarks

Back to top

Example

<div>
  <table width="100%">
    <tr>
      <td width="250" valign="top">

        <!-- EMPLOYEES TEMPLATE -->

        <xmod:Template Id="Employees">
          <ListDataSource CommandText="SELECT * FROM XMPDemo_Employees WHERE DepartmentId = @DepartmentId">
           <Parameter Name="DepartmentId" Alias="DepartmentId"/>
         </Listdatasource>
<HeaderTemplate>
            <p>Employees</p>
          </HeaderTemplate>
          <ItemTemplate>
            <div style="text-align: middle;">
              <strong>[[FirstName]] [[LastName]]</strong>

<xmod:AjaxButton Text="Get Employee History" Url='[[Join("~/GetEmployeeHistory.aspx?empid={0}",[[EmployeeId]])]]'
                    Target="#EmployeeHistory"/>

            </div>
          </ItemTemplate>

        </xmod:template>
      </td>
      <td>
        <div id="EmployeeHistory"></div>
      </td>
    </tr>
  </table>
</div>
 
 
 
Back to top