SP.Web.serverRelativeUrl Property
Applies to: SharePoint Foundation 2010
In this article
Property Value
Applies To
Remarks
Gets or sets the server-relative URL for the Web site.
var value = SP.Web.get_serverRelativeUrl();
SP.Web.set_serverRelativeUrl(value);
Property Value
Type: string
Applies To
Exceptions
- ArgumentException
The site is a top-level site. Error code: - 2147024809.
Remarks
It must not be null. It must not contain any of the reserved Urls. It must not contain the following illegal characters: [!#$&'+:<>?\\{|}~]|(//)|(\.\.)|(/_)|(/wpresources$)|(/wpresources/).