To get access to the correct SPSite entity from a webpart use the SPContext.Current where you have access to both the current site and web.
Posted under Developer
This post was written by furuknap on January 6, 2009
Visual Studio extentions for WSS, or VSeWSS for short, is a toolkit developed by Microsoft for creating SharePoint functionality and features using Visual Studio. The toolkit is available for both Visual Studio 2005 and 2008.
Read more on What is Visual Studio extentions for WSS…
This post was written by furuknap on January 4, 2009
To find associated groups in code you can either use the AssociatedGroups collection or access the individual groups as AssociatedOwnerGroup, AssociatedMemberGroup, or AssociatedVisitorGroup of an SPWeb object:
SPGroup owners = this.Web.AssociatedOwnerGroup; SPGroup members = this.Web.AssociatedMemberGroup; SPGroup visitors = this.Web.AssociatedVisitorGroup;
Read more on How do I find associated groups in code…
Posted under Developer
This post was written by furuknap on January 4, 2009
An associated group in SharePoint refers to the groups that are associated with the default roles in a SharePoint site. In SharePoint v3 these groups are Owners, Members, and Visitor. The groups are created by default when you create a new site collection. When you create a site inside an existing site collection the groups are created automatically if you select to not inherit permissions from the parent site.
Read more on What is an associated group in SharePoint…
Posted under Administration, Developer, FAQ
This post was written by furuknap on January 4, 2009
The only column to which you can add a link on the Create page is the Web Pages column. To add a link there, use a CustomAction feature with Location=”Microsoft.SharePoint.Create” and a GroupId=”WebPages”:
Read more on How do I add a link on the Create page…
Posted under Developer
This post was written by furuknap on January 3, 2009
To deploy a workflow in SharePoint you use a feature. The feature should contain an elements file which points to the workflow to deploy. Here is a sample elements.xml file:
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/“>
<Workflow
Name=”Workflow name”
Description=”Workflow description”
Id=”GUID”
CodeBesideClass=”Namespace.Workflowclass”
CodeBesideAssembly=”ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=publicKeyToken”
StatusUrl=”_layouts/WrkStat.aspx”>
<Categories/>
<MetaData>
</MetaData>
</Workflow>
</Elements>
Read more on How do I deploy a workflow in SharePoint…
Posted under Administration, Developer
This post was written by furuknap on December 12, 2008
To get a list of all subsites in a site you can run the following pattern:
using (SPSite site = new SPSite(“[YOUR SITE COLLECTION URL]“))
{
using (SPWeb web = site.RootWeb)
{
foreach (SPWeb subWeb in web.Webs)
{
// Do your thing…
}
}
}
Read more on How do I get a list of all subsites in a site…
Posted under Developer
This post was written by furuknap on December 9, 2008
The number of questions you can have in a survey varies by question type. To complicate matters you can also only have a limited number from a given question type group. The groups are:
Read more on What is the limit of questions in a SharePoint survey…
Posted under Administration, Developer, FAQ
This post was written by furuknap on December 9, 2008