How do I get a list of all subsites in a site

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

Tags:

How do I add a web part to a SharePoint page using the web interface

To add a web part to a SharePoint page using the web interface you need permissions to do so. If you have those permissions you will have a Site settings->Edit page option

Posted under Administration, End user

This post was written by furuknap on December 8, 2008

Tags:

How do I find the strong name of an assembly

To find the strong name of an assembly you have several options. If the assembly has been deployed to the global assembly cache, or GAC, you can open the assembly in the GAC (c:\Windows\Assembly) and view its properties.

Posted under Developer

This post was written by furuknap on December 8, 2008

Tags:

How do I add a feature with a feature receiver event handler

To add a feature with a feature receiver event handler your feature.xml file needs to have ReceiverAssembly and ReceiverClass added to the Feature element

Posted under Developer

This post was written by furuknap on December 8, 2008

Tags: