Friday, July 23, 2010

SPWeb.Users Vs SPWeb.SiteUsers

Hi,
You will have to get the instances of users who are in your site in some situations. Then make sure that you are using the proper property to get the details.

SPWeb.Users returns the users that are added to that particular subsite only. It will not list the users inherited form parent site.

SPWeb.SiteUsers returns all the users.

Same with SPWeb.Groups and SPWeb.SiteGroups.

No comments:

Post a Comment