I'm a beginner with SP COM. I can't find any samples about this online.
Could anybody tell me how I should proceed to add or remove a file from a document library in SP 2010 with the Client Object Model?
Thanks!
|
I'm a beginner with SP COM. I can't find any samples about this online. Could anybody tell me how I should proceed to add or remove a file from a document library in SP 2010 with the Client Object Model? Thanks! |
||||
|
|
|
To add a document to a document library in VB.Net:
Same classes and everything in C# too. Should be easy enough to translate this snippet. To delete a document, you can use the same code you would use to delete a list item (because a document library is just a special type of list). You should read How to: Create, Update, and Delete List Items. Hope this helps. |
|||
|
|
|
This should get you started on uploading a file in SharePoint with the Client Object Model: |
|||
|
|