Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Can't find content type?

$
0
0

First off, I just want to thank the people that take time out of their day to answer questions on this, or any forum for that matter. You people empower thousands of others with your knowledge.  

I'm working in code behind for a custom edit list form, trying to get a custom content type I created in this solution to create a new document set off of. Both my custom list and my custom document set content types show up in site settings, but in code I can't find the custom document set content type. 

SPContentType documentSetCT = currentWeb.ContentTypes["Document Set"]; //gets OOB "Document Set" content type
SPContentType customListCT = currentWeb.ContentTypes["CustomList"]; //gets my custom content type based off Item
SPContentType customDocumentSetCT = currentWeb.ContentTypes["customDocumentSet"]; //Finds nothing
Thoughts? What am I doing wrong here?


- Daniel


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>