I’m trying to get a Content Type by the Name or the ID.
I’m using this code but it does not work.
SPContentTypeId eventTypeId = new SPContentTypeId("0x0102");
SPContentType eventType = web.AvailableContentTypes[eventTypeId];
Do you have any ideas?
Thanks.
Based On the the information you have provided in your question, I think what you are looking for is something like this:
Good luck! 🙂