Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the absolute Universal Resource Locator (URL) for the specified server-relative URL.
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 GetFullUrl ( _
    Site As SPSite, _
    WebUrl As String _
) As String
'Usage
Dim Site As SPSite
Dim WebUrl As String
Dim returnValue As String
returnValue = SPUtility.GetFullUrl(Site, _
    WebUrl)
public static string GetFullUrl(
    SPSite Site,
    string WebUrl
)
Parameters
Site
Type: Microsoft.SharePoint.SPSiteA Microsoft.SharePoint.SPSite object that represents the site.
WebUrl
Type: System.StringA string that contains the server-relative URL. For example, /[sites/]//. For information about the usage of URLs in Microsoft SharePoint Foundation, see Describing Forms of URL Strings.
Return Value
Type: System.String
A string that contains the absolute URL.
Remarks
If the specified site is running on a non-default port, the port number will be included in the returned URL. For example, if the site is on port 81 and "/documents/File_Name.aspx" is passed as the WebUrl value, the returned URL will be in the form "http://Server_Name:81/documents/File_Name.aspx".