SPUtility.MapWebURLToVirtualServerURL Method
Returns the absolute Universal Resource Locator (URL) for the virtual server that contains the specified site.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Function MapWebURLToVirtualServerURL ( _
web As SPWeb, _
url As String _
) As String
'Usage
Dim web As SPWeb
Dim url As String
Dim returnValue As String
returnValue = SPUtility.MapWebURLToVirtualServerURL(web, _
url)
public static string MapWebURLToVirtualServerURL(
SPWeb web,
string url
)
Parameters
web
Type: Microsoft.SharePoint.SPWebA Microsoft.SharePoint.SPWeb object that represents the site.
url
Type: System.StringA string that contains the absolute URL for the site.
Return Value
Type: System.String
A string that contains the absolute URL for the virtual server.