ISharePointSite.RootWeb

Fore Syntax

RootWeb: ISharePointWeb;

Fore.NET Syntax

None;

Description

The RootWeb method initializes a new connection to the SharePoint site and returns the contents of the uppermost level of the site.

Example

Executing the example requires the SharePoint site located at: http://test-sharepoint.

Sub UserProc;
Var
    Site: ISharePointSite;
    Cred: INetNetworkCredential;
    Web: ISharePointWeb;
Begin
    Site := New SharePointSite.Create;
    Site.Url := "http://test-sharepoint";
    //Credentials for login
    Cred := New NetNetworkCredential.Create("user""password""test");
    Site.UseDefaultCredentials := False;
    Site.ThisHostCredentials := Cred;
    //Getting a root page of a site
    Web := Site.RootWeb;
End Sub UserProc;

On executing the example the connection to the SharePoint site and getting the root page of the site is executed. The specified credentials are used for authorization.

See also:

ISharePointSite