Name: SharePoint-Add-in-CSOM-BasicDataOperations
Owner: Office Developer
Description: Use the SharePoint client-side object model (CSOM) to perform create, read, update, and delete operations on lists and list items from a SharePoint Add-in.
Created: 2015-08-17 20:40:30.0
Updated: 2017-11-09 18:01:02.0
Pushed: 2017-12-28 21:36:56.0
Homepage: null
Size: 57
Language: C#
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Use the SharePoint client-side object model (CSOM) to perform create, read, update, and delete operations on lists and list items from a SharePoint Add-in.
This sample requires the following:
A SharePoint 2013 development environment that is configured for app isolation and OAuth. (A SharePoint Online Developer Site is automatically configured. For an on premise development environment, see Set up an on-premises development environment for SharePoint Add-ins and Use an Office 365 SharePoint site to authorize provider-hosted add-ins on an on-premises SharePoint site.)
Visual Studio and the Office Developer Tools for Visual Studio installed on your developer computer
The code that uses the CSOM APIs is located in the Default.aspx.cs file of the SharePoint-Add-in-CSOM-BasicDataOperationsWeb project. The Default.aspx page of the add-in appears after you install and launch the add-in and looks similar to the following.
The sample demonstrates the following:
How to read and write data to and from the host web of a SharePoint Add-in.
How to load the data returned from SharePoint into the client context object and then display the data.
Do not delete any of the built-in SharePoint lists. If you mistakenly do so, recover the list from the SharePoint Recycle Bin.
Problem | Solution |
---|---|
Visual Studio does not open the browser after you press the F5 key. | Set the app for SharePoint project as the startup project. |
HTTP error 405 Method not allowed. | Locate the applicationhost.config file in %userprofile%\Documents\IISExpress\config.
Locate the handler entry for StaticFile, and add the verbs GET, HEAD, POST, DEBUG, and TRACE. |
We'd love to get your feedback on this sample. You can send your questions and suggestions to us in the Issues section of this repository.
Complete basic operations using SharePoint 2013 client library code
Copyright (c) Microsoft. All rights reserved.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.