Business users don't want to show the content type when a user goes to the list/doc lib and clicks on new drop down. I used contypeType.Hidden = true; but it did not work.


Any other idea?

  • What content type are you trying to hide? An OOB one? Custom? How was the custom one created? May 20, 2011 at 19:59
  • are you talking about New Form or about drop down list with CTs to create before a New Form appear? May 20, 2011 at 20:48
  • Note that as the referenced article mentions, setting hidden will remove it from the new menu, but not the Content Type drop down on the edit form. That may be adequate (but it's not how I'd describe 'hidden'!)
    – Andy Burns
    May 23, 2011 at 8:58

2 Answers 2


Here is the code that works.

SPContentType oCT = spList.ContentTypes[ctName];
oCT.Hidden = true;
  • What is different about this code versus what you did the first time? Did you forget to run the .Update() method? May 20, 2011 at 20:00
  • @Tim: I had reinstantiate spcontenttype and this time with splist. First time i had to user web.availablecontenttype to associate a specific ct with my splist. then i could hide the custom ct use the code posted. Thanks
    – Roxanne
    May 20, 2011 at 20:04
  • @SiteOwner: R u serious? I have to wait 2 days before I can accept my own answer. Is this by design or bug?
    – Roxanne
    May 20, 2011 at 20:05
  • it's by design. May 23, 2011 at 1:19

Did you call the Update method after setting the Hidden property?

contentType.Hidden = true;

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.