| Register
Thursday, November 20, 2008
SharePoint Forums
SearchForum Home
     
  SharePoint Development  SharePoint Customization  Managing Conten...
 Managing ContentTypes using Object Model
 
vishvaj
2 posts
5th
Joined
9/28/2007

Managing ContentTypes using Object Model
Posted: 22 Sep 08 2:51 AM

I've created few ContentTypes and deployed them using Features. I can associate them to any document libraries by going to Advanced Settings page and selecting Yes to Allow manage content types.

I want to automate allowing magaging content types option by writing C# code using SharePoint object model.

Can anyone provide me good option. I use following line of code to associate my content type to document libraries:

SPContentType content = rootWeb.ContentTypes[MyCustomContentType];

  SharePoint Development  SharePoint Customization  Managing Conten...
(c) 2006 SharePoint Forums   |  Privacy Statement  |  Terms Of Use