Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SPUtility.GetFullUrl method

Returns the absolute Universal Resource Locator (URL) for the specified server-relative URL.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public static string GetFullUrl(
	SPSite Site,
	string WebUrl
)

Parameters

Site
Type: Microsoft.SharePoint.SPSite

A Microsoft.SharePoint.SPSite object that represents the site.

WebUrl
Type: System.String

A string that contains the server-relative URL. For example, /[sites/]//. For information about the usage of URLs in Microsoft SharePoint Foundation, see URLs and tokens in SharePoint 2013.

Return value

Type: System.String
A string that contains the absolute URL.

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".

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.