1
vote
2answers
135 views

Moving Document Libraries within same Site Collection using C#

I have C# code for Moving Document Libraries and its Items within same Site Collection maintaining its Metadata like "Modified", "Modified by" etc. Can anybody modify this code to move an entire ...
2
votes
1answer
25 views

How can I know from list id that it is a list or a library?

I want to know whether the current list which I have is Custom list or a document library. How cant I check this programmatically?
1
vote
2answers
89 views

Library event receiver - Object reference not set to an instance of an object

Yesterday I asked, where custom columns can come from. You helped me and told me that maybe it's event receiver. I created new event receiver and I added that try catch part: (Of course I change ...
2
votes
1answer
55 views

Add file without checking in

I have a question. How can I add a file without checking it in directly? I add file like this: Library.RootFolder.Files.Add(fileName, buffer, overwrite); But when I do that I suppose the file is ...
2
votes
2answers
216 views

Unable to create SPUserToken objects or use SPSecurity class

As shown in this image, I am unable to create a SPUserToken or run the SPSecurity.RunWithElevatedPrivileges() delegate in order to elevate the current user for the purpose of managing list item ...
1
vote
2answers
4k views

UpdateListItems in a library with client object model

I’m trying to update some metadata with web services. I read following msdn article UpdateListItems and wrote a small test program, but sadly something went wrong. I get the error message, that the ...
6
votes
1answer
2k views

Opening the default “New Document” editor for a given ContentType from an external C# application (Sharepoint 2010)

I'm currently working on integrating some SharePoint functionality to an existing C# application we have here. Most of the requirements have be fairly easy to implement: I'm using the ListData REST ...