Role of SPWeb.EnsureUser method

Explain the role of SPWeb.EnsureUser method

SPWeb.EnsureUser method validates whether the specified login name belongs to a valid user of the website or not. If the login name does not exist then it adds the login name to the website.

Example:
Dim instance As SPWeb
Dim loginName As String
Dim returnValue As SPUser
returnValue = instance.EnsureUser(loginName)
Difference between SPSite and SPWeb object
The SPSite object represents a collection of sites, i.e. Site Collection, a top level site and all its sub sites......
Role of SPWebApplication object
The SPWebApplication class consists of various methods and properties to perform various manipulations on web applications....
SharePoint List items
Create a reference to the SharePoint Lists.asmx web service by appending “/_vti_bin/Lists.asmx” to the end of a site name. One can use this url to add a service reference in Visual studio there onwards. ......
Post your comment