Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Guys how can I display an image attached to a list item in a data view web part. I cant find any examples of this on the net

share|improve this question
add comment

3 Answers

This post here http://support.microsoft.com/kb/2590041 explains how to get over an issue when creating Custom display forms which need to show attachments.

You would notice the presence of a certain field

<SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="Display" FieldName="Attachments" __designer:bind=""/>

Follow similar steps to include it in your data form.

share|improve this answer
add comment

Have you tried using XSL?

<xsl:element name="SharePoint:AttachmentsField">
  <xsl:attribute name="runat">server</xsl:attribute>
  <xsl:attribute name="FieldName">Attachments</xsl:attribute>
  <xsl:attribute name="ControlMode">Display</xsl:attribute>
  <xsl:attribute name="Visible">true</xsl:attribute>
  <xsl:attribute name="ItemId">
    <xsl:value-of select="@ID"/>
  </xsl:attribute>
</xsl:element>
share|improve this answer
    
This code change the title of the page to ["Name" column value] –  Mohit May 24 '13 at 10:09
add comment

Please refer :http://www.codeproject.com/Articles/31895/Displaying-Attachments-with-the-Data-View-Web-Part, it has same functionality implemented.

share|improve this answer
1  
Please dont just link to external content, as they tend to die fast. Paste in the relevant content and then link. –  Anders Rask Dec 10 '12 at 18:38
add comment

Your Answer

 
discard

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.