Export (0) Print
Expand All
Expand Minimize

SPWeb.OriginalBaseUrl method

Returns the base URL for the current request.

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

public static string OriginalBaseUrl(
	HttpRequest r


Type: System.Web.HttpRequest

A System.Web.HttpRequest object that represents the request.

Return value

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

The OriginalBaseUrl method is a static method and is called directly on the SPWeb class.

The following code example uses the OriginalBaseUrl method to display the base URL for the current request.

string strBaseUrl = SPWeb.OriginalBaseUrl(Request);
© 2014 Microsoft