<xmod:ToggleImage>

The ToggleImage tag renders as a clickable image at run-time. It provides you with a simple interface for leveraging jQuery functionality. Simply set a few attributes and you're done- no scripting necessary.

Note: This tag leverages and assumes the jQuery library is included in the page.

Syntax

<xmod:ToggleImage
    AlternateText="string"
    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"
    ImageAlign="NotSet|Left|Right|Baseline|Top|Middle|Bottom|AbsBottom|AbsMiddle|TextTop"
    ImageUrl="url"
    Speed="Slow|Normal|Fast|integer"

    Style="string"
    Target="string"
    ToolTip="string"
    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 EmployeeId, FirstName, LastName, Evaluation 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:ToggleImage alternatetext="New Employee" imageurl="~/images/add.gif"
               text="View Employee Evaluation" target='[[Join("divEvaluation_{0}",[[EmployeeId]])]]'
               speed="Fast" />

            </div>
            <div id="divEvaluation_[[EmployeeId]]">
              <p>[[Evaluation]]</p>
            </div>
          </itemtemplate>

        </xmod:template>
      </td>
    </tr>
  </table>
</div>
 
Back to top