runxc1 Bret Ferrier
runxc1 Bret Ferrier

Reputation: 8233

How do you add a Document programatically to a List in SharePoint?

I am using SharePoint 3.0 and I have an XML document that I am using in my application and I want to keep a history of the document so naturally I want to use a SharePoint Document List. How do I add the document diagrammatically to a List? Also Can I set permissions on it so that only admins can view/edit the document?

Upvotes: 0

Views: 401

Answers (1)

Francisco Aquino
Francisco Aquino

Reputation: 9117

The basics are on this msdn article

But to upload to a specific list, instead of web.RootFolder you will grab the list with web.Lists["listname"], theres more details about that in this other link.

Upvotes: 1

Related Questions