Please help me urgent..!

I have the following content types

ShareDoc Document
Program or Project Folder
Secure Folder

I am creating nested folder in sharepoint document library in my project. Problem: I created one folder name is "Test" and content type "Program or Project".If i create a subFolder , the content type of subFolder is "Program or Project".Becuase it is taking default parent content type.But i want to change the content type to "Folder".Please give me solution to reslove it.

Regards, Shiva Reddy.P

  • I am writing code to modify this not at design time , also a work flow is assigned by the client
    – shivareddy
    Commented Sep 24, 2010 at 12:30

2 Answers 2


Laura Rogers has a blog post about using different folder content types to display views, perhaps this may help you in setting up the subFolder's content type...



This got resloved.

Previous Code:

Dim CurContentFolder As SPFolder = rootFolder.SubFolders.Add (ObjectsChars.assign_mapchar2objects(folderPathSplit(DocLibCount))) CurContentFolder.Item(SPBuiltInFieldId.ContentTypeId) = curWeb.ContentTypes("Folder").Id CurContentFolder.Item.SystemUpdate()

Modifed Code:

Dim CurContentFolder As SPFolder = rootFolder.SubFolders.Add(ObjectsChars.assign_mapchar2objects(folderPathSplit(DocLibCount))) Dim newItem As SPListItem = CurContentFolder.Item newItem("Content Type") = "Folder" newItem.UpdateOverwriteVersion() newItem.SystemUpdate()

Thanks for all to help Me. Shiva Reddy.P

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.