ListFormWebPart.Content property
取得或設定內嵌的 HTML 或提供此 Web 組件的內容的 XML。
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<WebPartStorageAttribute(Storage.Shared)> _
<BrowsableAttribute(False)> _
<ResourcesAttribute("", "Advanced", "Content")> _
Public Property Content As String
Get
Set
'用途
Dim instance As ListFormWebPart
Dim value As String
value = instance.Content
instance.Content = value
[WebPartStorageAttribute(Storage.Shared)]
[BrowsableAttribute(false)]
[ResourcesAttribute("", "Advanced", "Content")]
public string Content { get; set; }
Property value
Type: System.String
字串,其中包含內嵌的 HTML 或 XML 內容。
備註
Content屬性是讀取/寫入。內嵌的內容會儲存在資料庫中的字串值。這個字串中,沒有最大長度,而且沒有預設值。因為Content屬性會包含 [網頁組件的本文,內容可以包含任何以 web 為基礎的材料。
這個屬性是選擇性的因為內容也可提供使用ContentLink屬性。若要提供內容,不過,至少一個這兩種方法必須使用。Web 組件頁面會先檢查ContentLink ,並使用它,如果有指定。
Content屬性可以包含內嵌的內容,或提供此 Web 組件應該會顯示如果ContentLink失敗的錯誤文字。依據您的網頁組件實作,這個屬性可以用來回應使用者嘗試達到不想透過網際網路或內部網路連線的線上內容。