<xmod:DeleteImage>

The DeleteImage tag renders as a clickable image at run-time. It is used to execute the <DeleteCommand> of its parent <xmod:template>.

Syntax

<xmod:DeleteImage
    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"
    OnClientClick="javascript"
    Style="string"
    Text="string"
    ToolTip="string"
    Visible="True|False"
    Width="size">

      <Parameter Name="string" Value="string" />
      <Parameter Name="string" Value="string" />
      ...additional parameters as needed ...

</xmod:DeleteImage>
 

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>
          <deletecommand commandtext="DELETE FROM XMPDemo_Employees WHERE EmployeeId = @EmpID">
            <parameter name="EmployeeId" alias="EmpID" />
          </deletecommand>
         
 <headertemplate>
            <p>Employees</p>
          </headertemplate>
          <itemtemplate>
            <div style="text-align: middle;">
              <strong>[[FirstName]] [[LastName]]</strong>
              <xmod:deleteimage alternatetext="Delete Employee" onclientclick="return confirm('Are you sure you want to delete this employee?');" imageurl="~/images/delete.gif">
                <parameter name="EmployeeId" value='[[EmployeeId]]' />
              </xmod:deleteimage>
            </div>
          </itemtemplate>
        </xmod:template>
      </td>
    </tr>
  </table>
</div>
 
 
 
Back to top