SPUtility.OriginalServerRelativeRequestUrl property
Microsoft SharePoint Foundation伺服器已重新撰寫其之後,請取得原始 URL。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared ReadOnly Property OriginalServerRelativeRequestUrl As String
Get
'用途
Dim value As String
value = SPUtility.OriginalServerRelativeRequestUrl
public static string OriginalServerRelativeRequestUrl { get; }
Property value
Type: System.String
String 物件,其中包含原始的要求伺服器相對 URL SharePoint Foundation,接收到,或傳回a null reference (Nothing in Visual Basic) ,如果此屬性用於外部網頁要求的內容。
備註
網頁要求的內容中, SharePoint Foundation可以修正_layouts和其他幾個檔案系統目錄中的 Url。此屬性會傳回原始 URL 之前它已修正,這是很有用,如果您需要從中載入應用程式] 頁面上的子網站。例如,當您開啟連結 /subweb/_layouts/settings.aspx, SharePoint Foundation會修正 /_layouts/settings.aspx 要求 URL。