I've created several content types that inherit from the document content type in the site content type lists. Please refer to the image below:
How do I get these these content types programmatically? Basically what I want to do is to show these content types in drop down lists so that the user can select which document library to upload a file to. I'm stuck here:
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPContentType documentContentType = web.AvailableContentTypes[SPBuiltInContentTypeId.Document];
}
}
Please provide some guidance. Thanks