共用方式為


SPWebEventReceiver.WebMoving Method

Synchronous Before event that occurs before an existing Web site has been renamed or moved to a different parent object.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Overridable Sub WebMoving ( _
    properties As SPWebEventProperties _
)
'Usage
Dim instance As SPWebEventReceiver
Dim properties As SPWebEventProperties

instance.WebMoving(properties)
public virtual void WebMoving(
    SPWebEventProperties properties
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

properties is null .

Remarks

The means for moving and renaming Web sites include the following:

  • Setting the ServerRelativeUrl of a Web site and calling the Update method.

  • Renaming—but not moving to a different parent object—the site in a Web authoring application that is compatible with SharePoint Foundation, such as Microsoft Office SharePoint Designer 2007.

This method supports event cancellation and error messages.

See Also

Reference

SPWebEventReceiver Class

SPWebEventReceiver Members

Microsoft.SharePoint Namespace