Share via


PageLayout.Name Property

Gets the name of this PageLayout object.

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

Syntax

'Declaration
Public Property Name As String
    Get
    Set
'Usage
Dim instance As PageLayout
Dim value As String

value = instance.Name

instance.Name = value
public string Name { get; set; }

Property Value

Type: System.String
The URL name for this PageLayout.

Exceptions

Exception Condition
UnauthorizedAccessException

The current user does not have sufficient permissions to perform this action.

Remarks

The Name value is initialized when a PageLayout object is created, and cannot be modified.

If this property value is used in HTML that is rendered in a Web browser, you should encode the property value to avoid the possibility of scripting attacks.

Another way to set the Name property is to use the PageLayout.ListItem.File.MoveTo(string) operation.

You must call Update after setting this property to save the changes.

The user must have edit permissions on the PageLayout object to set this value. The user must have view permissions on the PageLayout object to retrieve it initially and to get any of its property values.

See Also

Reference

PageLayout Class

PageLayout Members

Microsoft.SharePoint.Publishing Namespace

Name

MoveTo(SystemString)