SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want include the attachment image directly in data view web part.

I used the below code snippet, it is displayed image name link, but I need to print image here.

<xsl:element name="SharePoint:AttachmentsField">
    <xsl:attribute name="runat">server</xsl:attribute>
    <xsl:attribute name="FieldName">Attachments</xsl:attribute>
    <xsl:attribute name="Visible">true</xsl:attribute>
    <xsl:attribute name="ItemId"><xsl:value-of select="@ID"/></xsl:attribute>

I tried up to my level but it's not getting displayed.

share|improve this question
I think you need to improve your question to understand – Amit Kumawat Dec 6 '11 at 8:18
Is this a FIS? Can't you just have a link to document and then have the user print at thier own discretion? – Josey Dec 6 '11 at 20:26
Were you able to find a solution to display the image? – user13979 Jan 8 '13 at 21:27

Try assigning the value of what you have already in your question to a variable. Then if the length of that variable is greater than zero you can display whatever image you choose.

share|improve this answer
Marc can you elaborate this solution you posted? I would like to show the attachmenets as images. THanks – naijacoder May 7 '12 at 6:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.