SPWeb.OriginalBaseUrl 方法

Returns the base URL for the current request.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Shared Function OriginalBaseUrl ( _
    r As HttpRequest _
) As String
用法
Dim r As HttpRequest
Dim returnValue As String

returnValue = SPWeb.OriginalBaseUrl(r)
public static string OriginalBaseUrl(
    HttpRequest r
)

参数

返回值

类型: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.

Dim baseURL As String = SPWeb.OriginalBaseUrl(Request)

Response.Write(baseURL) 
string strBaseUrl = SPWeb.OriginalBaseUrl(Request);
Response.Write(strBaseUrl);

另请参阅

引用

SPWeb 类

SPWeb 成员

Microsoft.SharePoint 命名空间