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
)
参数
-
A System.Web.HttpRequest object that represents the request.
返回值
类型: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);