In this post I will discuss about how to add/remove content type to and from SharePoint list.
Add/remove Content type in SharePoint Designer:
when you open a list in SPD you will find Content Types section as shown in the figure below.
Once you select content type region you will find content type actions in the ribbon as well.
Add/remove content type programmaticaly:
In code I have removed “Folder” content type and added “Image” content type to the list. And so it should look like this in SharePoint designer.
Hope that helps…!!
Hi there,
I would like to do exactly what you did above in the programmatic way.
A silly question is that where do you add these code?
Programmatic code is normally developed using Visual Studio then deployed onto a server as part of a solution. its not something that you add through the sharepoint website itself.