Share via


ListItemProperty Class

The ListItemProperty class returns a property of a list item.

System.Object

   System.Web.UI.Control

      Microsoft.SharePoint.WebControls.SPControl

         Microsoft.SharePoint.WebControls.ListItemProperty

Public Constructors

The following table shows the public constructors of the ListItemProperty class and a brief description of each.

Name Description
ListItemProperty Initializes a new instance of the ListItemProperty class.

Protected Methods

The following table shows the protected methods of the ListItemProperty class and a brief description of each.

Name Description
Render Sends the content of the control to the specified HtmlTextWriter object, which writes the content that is rendered on the client.

Public Properties

The following table shows the public properties of the ListItemProperty class, the data type of each property, and a brief description of each.

Name Data Type Description
List String Gets or sets the GUID of the list to which the list item property pertains.
ListItemID String Gets or sets the ID assigned to the list item.
MaxLength Int32 Gets or sets the maximum number of characters that the list item can contain.
Property String Gets or sets the internal name of the field to render for the server control.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Example

The following code example from the item display form for a list uses the ListItemProperty control to return the title of the current item for display as part of the page heading.

<table cellpadding=0 cellspacing=0>
   <tr>
      <td nowrap class="ms-titlearea"><SharePoint:ProjectProperty Property="Title" /></td>
   </tr>
   <tr>
      <td ID=onetidPageTitle class="ms-pagetitle">
         <SharePoint:ListProperty Property="LinkTitle" />: <SharePoint:ListItemProperty Property="Title" MaxLength=40 />
      </td>
   </tr>
</table>

Requirements

Namespace: Microsoft.SharePoint.WebControls

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security