ListFormWebPart.Content property

Gets or sets embedded HTML or XML that provides content for this Web Part.

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

Syntax

'Declaration
<WebPartStorageAttribute(Storage.Shared)> _
<BrowsableAttribute(False)> _
<ResourcesAttribute("", "Advanced", "Content")> _
Public Property Content As String
    Get
    Set
'Usage
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
A string that contains embedded HTML or XML content.

Remarks

The Content property is read/write. Embedded content is stored as a string value in the database. There is no maximum length for this string, and there is no default value. Because the Content property contains the body of the Web Part, content can consist of any web-based material.

This property is optional, since content can also be provided using the ContentLink property. To provide content, however, at least one of these two methods must be used. The Web Part page checks the ContentLink first and uses that if it is specified.

The Content property can contain embedded content or provide error text that this Web Part should display if ContentLink fails. Depending on your Web Part Page implementation, this property can be used to respond to users who attempt to reach online content without an Internet or intranet connection.

See also

Reference

ListFormWebPart class

ListFormWebPart members

Microsoft.SharePoint.WebPartPages namespace