共用方式為


SimpleFormWebPart.Content property

取得或設定內嵌的 HTML 或提供此 Web 組件的內容的 XML。

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
<WebPartStorageAttribute(Storage.None)> _
<BrowsableAttribute(False)> _
Public Property Content As String
    Get
    Set
'用途
Dim instance As SimpleFormWebPart
Dim value As String

value = instance.Content

instance.Content = value
[WebPartStorageAttribute(Storage.None)]
[BrowsableAttribute(false)]
public string Content { get; set; }

Property value

Type: System.String
字串,其中包含內嵌的 HTML 或 XML 內容。

備註

Content屬性是讀取/寫入。這個屬性變更套用到此 [網頁組件的所有使用者。內嵌的內容會儲存在資料庫中的字串值。這個字串中,沒有最大長度,而且沒有預設值。因為Content屬性會包含 [網頁組件的本文,內容可以包含任何以 Web 為基礎的材料。

這個屬性是選擇性的因為內容也可提供使用ContentEditorWebPart.ContentLink屬性。若要提供內容,不過,至少一個這兩種方法必須使用。網頁組件會先檢查ContentLink ,並使用它,如果有指定。

Content屬性可以包含內嵌的內容,或提供此 Web 組件應該會顯示如果ContentLink失敗的錯誤文字。依據您的網頁組件實作,這個屬性可以用來回應使用者嘗試達到不想透過網際網路或內部網路連線的線上內容。

請參閱

參照

SimpleFormWebPart class

SimpleFormWebPart members

Microsoft.SharePoint.WebPartPages namespace