Wednesday, September 22, 2010

Difference between SPWeb.Groups and SPWeb.SiteGroups

SPWeb has two sharepoint cross-site group collection, SPWeb.Groups and SPWeb.SiteGroups. SPWeb.Groups returns collection of cross-site groups which has some permission on the site. So if you add group from a site without any permission on the site, then this group wont appear in SPWeb.Groups collection, but it will appear in SPWeb.SiteGroups collection.
You can not use SPWeb.Groups.Add method to add new cross-site group, you need to use SPWeb.SiteGroup.Add method for this purpose.

Info from Sridhar

No comments:

Post a Comment