sharepoint

Upload > 5 MB files to sharepoint 2013 programmatically

北慕城南 提交于 2019-12-24 05:07:25
问题 I am having troubles uploading large files to my sharepoint 2013/office 365 site. I am using Visual Stuidos 2010 and .NET 4.0 I have tried code from these questions: SP2010 Client Object Model 3 MB limit - updating maxReceivedMessageSize doesnt get applied maximum file upload size in sharepoint Upload large files 100mb+ to Sharepoint 2010 via c# Web Service How to download/upload files from/to SharePoint 2013 using CSOM? But nothing is working. So I need a little help. Here is code that I

Unable to retrieve file information from SharePoint library using Client Object Model

放肆的年华 提交于 2019-12-24 04:56:35
问题 I am trying to read some attributes from a file in SharePoint 2010 library using client object model. Here is the sample using SP = Microsoft.SharePoint.Client; SP.ClientContext clientContext = new SP.ClientContext( "http://path/to/the/site" ); clientContext.Load( clientContext.Web ); clientContext.ExecuteQuery(); SP.File spFile = clientContext.Web.GetFileByServerRelativeUrl("/TestLibrary/sample.pdf"); clientContext.Load(spFile); clientContext.ExecuteQuery(); //here we'll catch exception But

Using part of date in CAML query

大兔子大兔子 提交于 2019-12-24 04:52:13
问题 The title column in my list contains year only. I want to make a view, where I would display only last 3 years. I'm trying to use CAML query in List definition: <Query> <Where> <Geq> <FieldRef Name="Year" /> <Value Type="Number"> ???? </Value> </Geq> </Where> </Query> I was trying to get something here using <Today> element with Offset attribute, but without luck - it's not a DateTime value, but only a number. How to write filtering condition here? 回答1: Since it's not a datetime value ,it

Add a WebPart to an Application page

喜你入骨 提交于 2019-12-24 03:43:35
问题 I have a "Data view web part" created from SharePoint Designer. I added the web part to my visual studio project as a "Web Part" . I want to know how to add the web part to an application page. 回答1: Hi i know its kind of late but, today i had to do the same thing, so i followed a great answer on sharepoint.stackexchange.com. But basically is like adding any other asp.net control on an APS.NET page. First you need to define the prefix for that assembly <%@ Register tagprefix="prefix" namespace

Programmatically access files in Document set in sharepoint using Javascript

做~自己de王妃 提交于 2019-12-24 03:14:30
问题 I want to access files in a particular document set in a document library . So far i was able to get the particular document set name and ID using JSOM as below . How to read all the files inside the document set <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script> <script type="text/javascript" src="_layouts/15/sp.runtime.js"></script> <script type="text/javascript" src="_layouts/15/sp.js"></script> <script type="text/javascript">

Getting Id from uploaded file to Sharepoint 2013 DocumentLibrary

*爱你&永不变心* 提交于 2019-12-24 03:00:32
问题 I have this function where I upload a file into a Sharepoint 2013 Document Library. I want to be able to retrieve the newly created Id of the Document Library entry. public void UploadFileToSharePoint(string file) { ClientContext context = new ClientContext("http://test-sp01"); Web web = context.Web; FileCreationInformation newFile = new FileCreationInformation(); newFile.Content = System.IO.File.ReadAllBytes(file); newFile.Url = System.IO.Path.GetFileName(file); List docs = web.Lists

How can I set a User field to a default value of a user currently logged in through XML in Sharepoint 2010?

半城伤御伤魂 提交于 2019-12-24 02:55:11
问题 I'm trying to create an field definition in XML for a field of a User type and need to set its default value to a user currently logged in. How do I do that? Thanks a lot in advance. 回答1: Here is the closest I've ever come: <Field ID="{99ced9dc-5715-47a7-9ede-1733f027eeb4}" Name="MyField" DisplayName="My Field" Type="User" List="UserInfo" UserSelectionMode="PeopleOnly" Required="TRUE"> <DefaultFormula>=";#"&Me</DefaultFormula> </Field> It doesn't blow up, but it doesn't give the desired

Solving Assembly not Found | FileNotFoundException | Fusion Log

前提是你 提交于 2019-12-24 02:48:37
问题 I am trying to deploy my solution package (wsp) to SharePoint 2007 environment. The WSP contains a feature which loads the feature receiver class to deploy a timer job at run time. While deploying this WSP, I am consistently getting Feature 'fb631f6c-2c46-4ab5-b7b3-f3d0c949c5f0' could not be installed because the loading of event receiver assembly "XXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bad6857072694970" failed: System.IO.FileNotFoundException I have double checked everything

Using jQuery to alter application.master pages in SharePoint

跟風遠走 提交于 2019-12-24 02:28:12
问题 We use MOSS 2007 (SharePoint) for our intranet. Recently we were tasked with supporting the branding for multiple companies on our farm. We quickly realized that the application pages (produced by a modified application.master) can't serve up multiple branded templates (other than themes). I think the right fix is to keep the default Microsoft branding on application pages (we were already working on this in dev - no modifications to files hosted on the server). As a quick fix however, I was

People picker control implementation in asp.net mvc application

青春壹個敷衍的年華 提交于 2019-12-24 02:09:28
问题 I want to include the Sharepoint people picker control type in my application, My app is developed in asp.net MVC. is there a way so that i can include the GAL feature in my asp.net application. This should work even if the outlook is not installed in user pc. 回答1: Taken from this page dated March 1 2013 "SP controls can only be used on SP hosted pages. Currently the only control designed from the ground up to be consumed on all page types (provider-hosted, auto-hosted or sp hosted) is the