Jim Mathew's Sharepoint Blog (MOSS Techie from Abu Dhabi)

August 23, 2009

Display attachments in sharepoint dataview webpart using sharepoint designer

Filed under: Code Snippets, Dataview, Sharepoint Designer — Tags: , — Jim Mathew @ 1:58 PM

Use below code to show attachments in sharepoint dataview webpart .

Use this for Single List Item View:
<SharePoint:AttachmentsField ControlMode=”Display” ItemId=”{@ID}” EnableViewState=”true” FieldName=”Attachments”  runat=”server”/>

Use this for Multiple List item Vew:
<SharePoint:AttachmentButton ControlMode=”Edit” Enabled=”true” ItemId=”{@ID}” runat=”server” Visible=”false”/><SharePoint:AttachmentsField ControlMode=”Display” ItemId=”{@ID}” EnableViewState=”true” FieldName=”Attachments” runat=”server”/>

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.