PC Review


Reply
Thread Tools Rate Thread

Check Whether SharePoint Group Exists

 
 
Fao, Sean
Guest
Posts: n/a
 
      26th Sep 2007
I was wondering if there was any way to programmatically determine
whether or not a group exists in SharePoint. I checked the
SPGroupCollection in the SPWeb.SiteGroups property and didn't see any
methods for doing lookups. I could obviously write my own code that
loops through each group, but I was wondering if there was an
easier/cleaner way to accomplish this task.

Thank you in advance,

--
Sean
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      26th Sep 2007
On Sep 26, 9:53 pm, "Fao, Sean" <enceladus...@yahoo.comI-WANT-NO-SPAM>
wrote:
> I was wondering if there was any way to programmatically determine
> whether or not a group exists in SharePoint. I checked the
> SPGroupCollection in the SPWeb.SiteGroups property and didn't see any
> methods for doing lookups. I could obviously write my own code that
> loops through each group, but I was wondering if there was an
> easier/cleaner way to accomplish this task.
>
> Thank you in advance,
>
> --
> Sean


what about loop?

foreach(SPGroup spGroup in spWeb.SiteGroups)
{
....
}

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check whether URL exists Greg Lovern Microsoft Excel Programming 1 15th Mar 2011 11:13 PM
Using excel to Determine if a File Exists in SharePoint ryguy7272 Microsoft Excel Programming 11 1st Jun 2010 09:34 PM
DSN, Check if exists Bernie Hunt Microsoft ADO .NET 2 10th Apr 2006 04:40 PM
Check url exists Pete Microsoft ASP .NET 1 29th Nov 2004 04:13 PM
Check to see if Doc exists Ryan Microsoft Access Form Coding 7 14th Nov 2003 10:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:47 AM.