Partager via


Name Property

The Name property of the SPUser class gets or sets the display name of the user.

Property Value

A string that contains the display name.

Remarks

To modify the display name for a user by setting the value of the Name property, call the Update method to effect the changes in the database.

Example

The following code example modifies the display name for a specified user object.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security