So on a recent project I needed to show a link to the attachment for each item in a list. A quick Google search found How to show Attachments with DataFormWebPart from Dario Martirani Paolillo’s Web Log. I was excited because it seemed to work well and was very easy to implement.
As I was about to finish up the project I was given some new requirements which meant that there would be two Data View Web Parts on the page and both would need to show the attachments link. This is when the issues started. When you have two web parts on the page using the display attachments code the second one will just show “[value of field: Attachments]” instead of the actual link. If anyone knows a good solution for this issue please post a comment.
I want to avoid using something like this jQuery solution by Paul Grenier simply because of the performance issues it will create.
i have a requirement exactly like yours and i am facing the same problem where the first dataview’s attachments are displayed correctly however the second dataview’s attachments are not displayed, rather a small box with the text:
[“Attachments” column value]
appears where the attachments are supposed to be displayed. I have tried everything from XSL to SharePoint:AttachmentsField to SharePoint:FormField and nothing seems to work.
|If you did find a solution, kindly let me know.. and I’ll do the same if I find one.
I never found a good solution. After talking more with the client I ended up using a document library.
It works you just have to write next code line in the cell you want to display attachments links.
Share Point Designer will show an error, but it will be displayed in the IExplorer.
Hope it helps…
@ Alex – I’ll have to try that. Thanks
Alex- Can you please explain?
All-Has anyone found an answer?
This might help. http://sharepointjim.wordpress.com/2009/08/23/display-attachments-in-sharepoint-dataview-webpart-using-sharepoint-designer/