共用方式為


Web.ServerRelativeUrl 屬性

取得或設定網站的伺服器相對 URL。

命名空間:  Microsoft.SharePoint.Client
組件:   Microsoft.SharePoint.Client.Silverlight (在 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone (在 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)

語法

'宣告
Public Property ServerRelativeUrl As String
    Get
    Set
'用途
Dim instance As Web
Dim value As String

value = instance.ServerRelativeUrl

instance.ServerRelativeUrl = value
public string ServerRelativeUrl { get; set; }

屬性值

類型:System.String
包含伺服器相對 URL 的字串。

例外狀況

例外狀況 條件
ArgumentException

網站是最上層的網站。錯誤碼:-2147024809。

備註

它不能null 參考 (未執行任何動作 於 Visual Basic 中)。它不能包含任何保留的 Url。它不能包含下列不正確的字元 ︰ [!#$&'+:<>?\\{|}~]|(//)|(\.\.)|(/_)|(/wpresources$)|(/wpresources/)。

請參閱

參照

Web 類別

Web 成員

Microsoft.SharePoint.Client 命名空間