Share via


InheritableProperty<TValueType>.SetValue method (TValueType, Boolean)

Set value of this property.

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

Syntax

'Declaration
Public Function SetValue ( _
    value As TValueType, _
    forceAllSubWebInherit As Boolean _
) As LongRunningOperationJob
'Usage
Dim instance As InheritableProperty
Dim value As TValueType
Dim forceAllSubWebInherit As Boolean
Dim returnValue As LongRunningOperationJob

returnValue = instance.SetValue(value, _
    forceAllSubWebInherit)
public LongRunningOperationJob SetValue(
    TValueType value,
    bool forceAllSubWebInherit
)

Parameters

  • value
    Type: TValueType

    The property value set by this method.

  • forceAllSubWebInherit
    Type: System.Boolean

    Forces all subsites to inherit this value, even if the property on a subsite currently does not inherit.

Return value

Type: LongRunningOperationJob
A LongRunningOperationJob object.

Remarks

This method sets the value of the current PublishingWeb object, and forces all child PublishingWeb objects to inherit the new value if the forceAllSubWebInherit parameter is set to True. If the forceAllSubWebInherit parameter is set to TRUE, the user must have permissions to modify any child PublishingWeb objects that are marked as inheriting. This operation may be asynchronous if there subsites exist under the current site.

See also

Reference

InheritableProperty<TValueType> class

InheritableProperty<TValueType> members

SetValue overload

Microsoft.SharePoint.Publishing namespace

InheritableProperty<TValueType>