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

SP.Web Class

Exceptions

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/).

See Also

Reference

SP.Web Methods

SP.Web Properties

SP Namespace