A class of the Microsoft.SharePoint namespace that represents a file in a SharePoint Web site that can be a Web Parts page, an item in a document library, or a file in a folder.

learn more… | top users | synonyms

1
vote
1answer
52 views

Why UniqueId missing in the REST api result from on-premise version

All, I found there is a property named UniqueId exist in the type of SP.File. And I try to retrieve the File item of the Page from SharePoint 2013 on-premise. The REST api url I used is ...
1
vote
1answer
224 views

How to Copy SPFile to another library while retaining history

I am looking for code that will 100% duplicate a file including all historical versions, dates of versions, comments and anything else. My test code is showing that capturing all those details is a ...
1
vote
1answer
1k views

Programmaticly updating SPFileVersion.Properties Hashtable

Anyone who has experience with programmaticly updating the SPFileVersion.Properties Hashtable? I have a special situation where I would like to modify this Hashtable. Most of you will say: "Why on ...
0
votes
1answer
1k views

Sharepoint 2013 ItemAdded event receiver for renaming files is not working

In SP 2013 I coded an event receiver that intercepts the ItemAdded event and it just renames the file. It is a synchronous event (I added Synchronous in the Elements.xml). This is the code: ...
0
votes
1answer
175 views

How to upload spfile to document library?

I am creating new web in the ItemAdded event receiver and I want to upload the picture that is attached with the item to the newly created site's picture library and if no attachment is there then I ...
2
votes
0answers
96 views

Error thrown after SaveBinary in ItemAdded event handler

I'm working on a ItemAdded event for a document library, and I'm running into this error in SharePoint 2007... The file Lists/Shared Audit Documents/1387/Audit Report.docm has been modified by ...
1
vote
0answers
148 views

Add New & Edit Form to List via C#

I have a project that needs to associate custom New and Edit forms with list instances. The lists are not part of the project, but the custom forms are. I currently deploy them to ...
0
votes
0answers
23 views

Open file in Edit mode

I need to open a file in edit mode. In my web part on item click I need to do some action before hand (like create a folder and copy file, then open it in edit mode). I came across the code segment ...
0
votes
0answers
92 views

Why is file still locked after successful SPFile.ReleaseLock()?

I want to lock a file, perform some operation on it, then unlock it. This is what I have so far (I do this in an item event receiver for ItemUpdating): try { ...