objectmodel

SharePoint 2007 Object Model: How can I make a new site collection, move the original main site to be a subsite of the new site collection?

Here's my current setup: one site collection on a SharePoint 2007 (MOSS Enterprise) box (32 GB total in size) one main site with many subsites (mostly created from the team site template, if that matters) that is part of the one site collection on the box What I'm trying to do*: *If there is a better order, or method for the followi...

SharePoint 2010 - Client Object Model - Add attachment to ListItem

Hi, I have a SharePoint List to which I'm adding new ListItems using the Client Object Model. Adding ListItems is not a problem and works great. Now I want to add attachments. I'm using the SaveBinaryDirect in the following manner: File.SaveBinaryDirect(clientCtx, url.AbsolutePath + "/Attachments/31/" + fileName, inputStream, tru...