Showing posts with label Attachment in DataView. Show all posts
Showing posts with label Attachment in DataView. Show all posts

Wednesday, March 10, 2010

Displaying Attachments in DataView

Normally attachments don't show up in a DataView webpart in SharePoint Designer. To display the attachments, add the following lines in your DataView.

<SharePoint:AttachmentButton ControlMode="Edit" Enabled="true" ItemId="{@ID}" runat="server" Visible="false"/><SharePoint:AttachmentsField ControlMode="Display" ItemId="{@ID}" EnableViewState="true" FieldName="Attachments" runat="server"/>

Thanks to the following link.
http://dbweb.sbisite.com/blogs/bf/Lists/Posts/Post.aspx?ID=19