473,799 Members | 3,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check Whether SharePoint Group Exists

I was wondering if there was any way to programmaticall y determine
whether or not a group exists in SharePoint. I checked the
SPGroupCollecti on in the SPWeb.SiteGroup s 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
Sep 26 '07 #1
1 7844
On Sep 26, 9:53 pm, "Fao, Sean" <enceladus...@y ahoo.comI-WANT-NO-SPAM>
wrote:
I was wondering if there was any way to programmaticall y determine
whether or not a group exists in SharePoint. I checked the
SPGroupCollecti on in the SPWeb.SiteGroup s 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.SiteGroup s)
{
....
}

Sep 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
33470
by: andylcx | last post by:
Hi all: The c++ language can check whether the file exist or not. I am wondering how c language does this job? Thanks a lot! Andy
6
2152
by: Michael S | last post by:
Not sure if I'm posting in the right group but here goes. I am getting the following error when trying to browse to an .aspx page which I have set up in a virtual directory under the default companyweb sharepoint site on Microsoft SBS 2003. I've tried various suggestions I've seen in other posts but no luck. I've also tried giving every single user/group full permissions to the directory and files but still no luck. The page works...
3
1930
by: Robin | last post by:
I am trying to get a virtual directory ASP.Net application to work on a Windows 2003 server that has Sharepoint 2003. I have followed the Microsoft knowledgebase but the error message below still occurs. http://support.microsoft.com/default.aspx?scid=kb;en-us;828810 What other changes are required to get the virtual directory use its own web.config file? Configuration Error
15
3509
by: (PeteCresswell) | last post by:
Got a sample of MS's "Advisor Guide To Microsoft Access" in the mail today - accompanied by a sample "Advisor Guide To Microsoft SharePoint". I skimmed both, but the SharePoint explanation is too abstract - it's going right over my head. Can somebody explain, in simple/concrete terms what MS SharePoint is? -- PeteCresswell
4
2430
by: Ronald S. Cook | last post by:
I've always used Visual SourceSafe for checking in/out source code. We also used it for deliverables (e.g. functional specification document), but should we be using SharePoint for that instead? And what's happening to Visual SourceSafe.. is it going away? I'd like to understand if/how Visual Studio "Team Edition" (I guess I mean Team Foundation Server) addresses this. Thanks in advance for any responses.
20
2758
by: Neil | last post by:
What is Sharepoint, and should I care?
1
2010
by: tagg3rx | last post by:
Hi all, I'm trying to figure out how to facilitate a window in my web application that will allow users to drag and drop files into it which will inturn trigger the files being uploaded to my server. This functionality exists in sharepoint and I see that visual web developer has a section of tools for webparts so I assume I can somehow use sharepoint webparts in my application. Anyways any help and advice you can offer would be...
0
1329
by: =?Utf-8?B?U2FkaG5h?= | last post by:
HI , I am using MOSS 2007 API's to implement the version controls like check in and check out in Visual Studio 2005. I have a sharepoint 2007 server and i am accessing the MOSS API (on sharepoint server) from dotnet web application on my local machine using a custom webservice. I am able to check out the document on the sharepoint server by calling the API "item.File.CheckOut();" method via custom webservice. But once i check out the...
1
9592
by: ykhamitkar | last post by:
Hi there, can anyone help me for the code to check if a file exists on the sharepoint link and what object I need to pick up from the reference(if any) Thanks Yogesh
0
9543
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10488
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.