tag:blogger.com,1999:blog-3415161966902468034.post6874926050904696226..comments2023-05-07T11:35:20.028+02:00Comments on isolutions SharePoint Blog: Get or set the content type of a list item programmaticallyDavid Schneiderhttp://www.blogger.com/profile/03271591108340303444noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-3415161966902468034.post-17183996741921985542008-04-16T19:03:00.000+02:002008-04-16T19:03:00.000+02:00Or you can use an SPContentTypeId object:SPContent...Or you can use an SPContentTypeId object:<BR/><BR/>SPContentTypeId myCTID = new SPContentTypeId("guid of the target content type");<BR/><BR/>myListItem["Content Type ID"] = myCTID;<BR/><BR/>// or you could probably use the Id or Guid of the ListItem's content type field such as:<BR/><BR/>Guid oG = new Guid("guid of the listitem's content type field");<BR/><BR/>myListItem[oG] = myCTID;pshisbeyhttps://www.blogger.com/profile/08396086362326294689noreply@blogger.com