如果在自定义页面利用xslt显示List的某一个Item的附件,只需要以下两步即可:
1.
在页面头部加入以下代码:
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
2.
在需要显示附件的地方加入以下代码:
<SharePoint:AttachmentsField ItemId="{@ID}" ControlMode="Display" FieldName="Attachments" runat="server" Visible="true"/>
参考网址:
http://www.getsharepoint.com/blogs/bf/Lists/Posts/Post.aspx?ID=11
http://support.microsoft.com/kb/953271/en-us
http://www.getsharepoint.com/blogs/bf/Lists/Posts/Post.aspx?ID=19
http://social.msdn.microsoft.com/Forums/zh-CN/sharepointadmin/thread/60b11e64-dc40-4982-9b22-d574b5e12f1e