SPSite.SetUrl method

Set secondary URL and zone for the site collection. If the URL exist for the site collection, then we only update the zone for the existing URL. If the URL does not exist, we will add the URL and the zone for the site collection.

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

Syntax

'Declaration
Public Sub SetUrl ( _
    uri As Uri, _
    zone As SPUrlZone _
)
'Usage
Dim instance As SPSite
Dim uri As Uri
Dim zone As SPUrlZone

instance.SetUrl(uri, zone)
public void SetUrl(
    Uri uri,
    SPUrlZone zone
)

Parameters

  • uri
    Type: System.Uri

    The URL to set for the site collection.

See also

Reference

SPSite class

SPSite members

Microsoft.SharePoint namespace