?
Solved

Need example creating a new SharePoint 2010 document and setting attributes

Posted on 2011-05-12
8
Medium Priority
?
813 Views
Last Modified: 2012-08-14
I need an example in .Net (preferably vb.net) of creating a new document in a SharePoint 2010 document library and setting several custom attributes.

We have to uplaod files to a SP 2010 Doc Library via code and set several attributes on it (actually nearly a dozen custom fields).  We haven't been able to find any code that shows how to do this.
0
Comment
Question by:Gene Klamerus
  • 4
  • 3
8 Comments
 
LVL 1

Author Comment

by:Gene Klamerus
ID: 35757985
I don't see where any of these are examples of creating a document in a document library.
0
 
LVL 1

Author Comment

by:Gene Klamerus
ID: 35757994
One additional point though, since I need to create new documents (and their metadata/attributes) clearly I'm talking about a .Net desktop application talking ot the SharePoint site.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35758069
0
 
LVL 1

Author Comment

by:Gene Klamerus
ID: 35758135
Don't really care about vb vs. C#, but I do have concerns that from what I read the mechanism is different for SP 2010 than it was for SP 2007.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35758160
There are many ways of working with Sharepoint. You can use the Sharepoint SDK to directly access the object model or you can use the Webservices to communicate with the server.
0
 
LVL 1

Author Comment

by:Gene Klamerus
ID: 35758168
Also most examples I've found don't show how to do an upload from a desktop (no references to services and the like).

In a nutshell, I've got to write something that will upload files into SharePoint 2010 setting some attributes (fields) on them from data in a spreadsheet.

So I've got to read the spreadsheet (which I can do) and the files (same), but upload the files one at a time into the doc library (which I don't know how to do) from a Windows 7 desktop.
0
 
LVL 16

Accepted Solution

by:
jessc7 earned 2000 total points
ID: 35758894
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question