Expand Minimize
This topic has not yet been rated - Rate this topic

SPWeb.OriginalBaseUrl Method

Windows SharePoint Services 3
Returns the base URL for the current request.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
public static string OriginalBaseUrl (
	HttpRequest r
)

Parameters

r

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

Return Value

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);
Response.Write(strBaseUrl);
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.