Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

徵狀

當 SharePoint Designer 產生自訂顯示表單時,附件不會公開(如果有的話)。 請參閱下列連結,以取得有關自訂清單表單的其他資訊:Http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-custom-list-form-using-sharepoint-designer-HA010378258.aspx[外框] ListFormWebPart 不會顯示此行為。

原因

用戶端缺少執行此工作所需的標記。

解決方案

若要解決此問題,使用者可以建立程式碼片段,並視 [程式碼] 視圖所需插入標記。或者,使用者只需貼上用來在自訂清單表單中建立程式碼程式碼片段的標記即可。下列標記可以用來建立程式碼片段:

<tr> <td nowrap="true" valign="top" class="ms-formlabel" width="20%">  <SharePoint:FieldLabel ControlMode="Display" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%">  <SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="Display" FieldName="Attachments" __designer:bind=""/> </td></tr>

若要在 SharePoint Designer 2010 中建立程式碼段,請執行下列動作:1。 按一下 SPD 2010.2 內的 [檔案] 功能表。 然後按一下 [選項],然後在 [一般] 索引標籤的 [選擇頁面編輯器] 選項底下。 切換到 [程式碼段] 索引標籤. 4。 按一下 [新增] 按鈕,並將其命名為 attachmentFix (5)。 提供說明,以協助提供程式碼段的內容。6。 貼上下列標記,即可自動在顯示表單的附件功能中新增工作。

<tr> <td nowrap="true" valign="top" class="ms-formlabel" width="20%">  <SharePoint:FieldLabel ControlMode="Display" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%">  <SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="Display" FieldName="Attachments" __designer:bind=""/> </td></tr>

7. 按一下 [確定],然後按一下 [確定]。 現在,當您使用自訂清單表單且需要上述標記,請在 [程式碼] 視圖中執行下列動作: Control + Enter。9。 這會顯示內建的程式碼片段,以及建立的程式碼段。 選取 [attachmentFix],隨即會插入所有標記。您可以透過群組原則或其他傳遞機制來進一步自動化。 例如,Windows 7 使用下列路徑來儲存自訂程式碼片段: C: \Users\UserName\AppData\Roaming\Microsoft\SharePoint Designer\SnippetsThe 後續檔說明程式碼片段的內部程式:HTTP://msdn.microsoft.com/en-us/library/aa218645 (v =) .aspx # odc_fpcustomizingsnippets_tocreateacodesnippet檔案在執行上述步驟之後,該檔案 SnippetsCustom 包含下列專案:

<?xml version="1.0"?><!-- Code Snippet Configuration File --><snippets><snippet keyword="attachmentFix">  <description>Custom display form attachment fix.</description>  <text><tr> <td nowrap="true" valign="top" class="ms-formlabel" width="20%">  <SharePoint:FieldLabel ControlMode="Display" FieldName="Attachments" runat="server"/> </td> <td valign="top" class="ms-formbody" width="80%">  <SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="Display" FieldName="Attachments" __designer:bind=""/> </td></tr></text> </snippet></snippets>

其他相關資訊

根據您的修補程式層級和產品版本,[編輯] 和 [新增表單] 不會有這個問題。1。 安裝適用于 SharePoint Designer 2007 和 WSS 3.0 的 Service Pack 2 之後,附加功能將能正常運作,以便進行編輯,並向前進行新的表單。 舊的表單需要使用新功能來補充。2。 您可以使用 [編輯] 和 [新增表單] 外框中的 [SharePoint Designer 2010] 和 [SharePoint Foundation]。3。 SharePoint Designer 2007 和 SharePoint Designer 2010 遇到顯示表單的問題。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×