Search Wiki:

SharePoint 2010: SDK Code Samples


Introduction

This resource is an index of Microsoft SharePoint 2010 code samples and developer resources.
For a list of valuable samples and related technical articles in the MSDN Library, see SharePoint 2010: Technical Articles: Code Samples. For a list of samples and related Visual How Tos, see SharePoint 2010: Visual How Tos: Code Samples.


SharePoint Foundation 2010 Code Samples


Name Description Language
Silverlight List Viewer The Silverlight List Viewer sample creates a Silverlight application that, when hosted on a SharePoint Web site, will display list items from that site. C#
Creating a Content Class That Can Be Backed Up A C# code sample that shows how to create a class that represents content and that can be backed up and restored because the class implements the IBackupRestore interface. C#
Custom Field A C# code sample that shows how to create a class that represents content and that can be backed up and restored because the class implements the IBackupRestore interface. C#
Starter Master Page A minimal master page file for SharePoint Foundation 2010. XML

SharePoint Server 2010 Code Samples


Business Connectivity Services Sample Solutions

Name Description Language
AdventureWorks2008 .NET Assembly The AdventureWorks2008 .NET Assembly sample shows how to use a Microsoft .NET Framework assembly as an external system, which has its methods mapped to Business Data Connectivity (BDC) service stereotype methods in the BDC model file. C#
AdventureWorks2008 ASP.NET Web Service The AdventureWorks2008 ASP.NET Web Service sample shows how to use an ASP.NET Web service as an external system, which has its Web methods mapped to Business Data Connectivity (BDC) service stereotype methods in the BDC model file. C#
AdventureWorks2008 WCF Service The AdventureWorks2008 WCF Service sample shows how to use a Windows Communication Foundation (WCF) service as an external system. C#
AdventureWorks2008 Declarative Outlook Solution The AdventureWorks2008 Declarative Outlook Solution sample enables you to track contacts from a database external system by accessing them in Microsoft Outlook as native Outlook contacts. XML
AdventureWorks2008 Declarative Outlook Solution Reusable Components The AdventureWorks2008 Declarative Outlook Solution Reusable Components sample enables you to add custom Microsoft Business Connectivity Services (BCS) components to your declarative Microsoft Outlook solution. XML
Advanced Code-Based Outlook Solution The Advanced Code-Based Outlook Solution sample shows how to create an Microsoft Outlook Add-in project that is an advanced code-based solution that uses Microsoft Business Connectivity Services (BCS). C#
Sample Orders ASP.NET Web Service The Orders ASP.NET Sample Web Service sample shows how to use an ASP.NET Web service as an external system. The Web service exposes methods for Create, Read, Update, and Delete (CRUD) operations and other methods that return data based on relationships between the different entities. C#
Sample Orders WCF Service The Sample Orders WCF Service sample shows how to use a Windows Communication Foundation (WCF) service as an external system. C#
Sample Orders .NET Assembly The Sample Orders .NET Assembly sample shows how to use a Microsoft .NET Framework assembly as an external system. C#
Authenticating and Consuming Data from Netflix (Web 2.0 Application) This Microsoft Business Connectivity Services (BCS) sample application demonstrates that by using the Business Connectivity Services extensibility mechanism, you can plug in code to authenticate against a Web 2.0 application. This sample particularly demonstrates authenticating and consuming Netflix data. C#
Custom Web Part and Word Add-in The Custom Web Part and Word Add-in sample solves a presentation limitation of the external list by enabling the hierarchical display of items in the client from an external Document Management System (DMS) by using Microsoft Business Connectivity Services (BCS). C#
Sandboxed Workflow Sample The Sandboxed Workflow sample describes how to create sandboxed workflow actions that read from external lists by using the SharePoint List object model. C#
BCS Full-Trust Workflow Activity Sample The BCS Full-Trust Activity Workflow sample shows how to create a full-trust activity for a workflow that uses Microsoft Business Connectivity Services (BCS). C#

Enterprise Content Management Samples

Name Description Language
Content Type Based Metadata This sample demonstrates how to apply metadata based on a specified content type. C#
Create a Routing Rule This routing rule uses an ItemAdded event receiver to automatically create routing rules. C#
Custom Document ID Provider This code sample shows how to create a custom Document ID provider that generates Document IDs. C#
Managing Managed Metadata Dependencies This sample demonstrates dependency management with one column for storing managed metadata fields, one column for multivalue managed metadata fields that define other items that the current item depends on, and one column for multivalue managed metadata fields that specify the items that depend on the current item. C#
Pausable Timer Job This sample timer job supports pausing or resuming a timer job at a custom level that is more granular than the list level, but less granular than the item level. C#
Publishing Cache Services and Silverlight These interrelated samples demonstrate how to retrieve data from the server’s cross-list query cache and render that data by using Silverlight applications. C#
Shared Retention Events This sample demonstrates how to create a deployable farm solution that extends the information management policy shared retention policy feature. C#
Generate Managed Metadata Hierarchy This sample shows how to generate the path of the taxonomy from a specified term up to its parent. C#
Document Set Ribbon and Export This sample shows how to add a new custom button to the Manage tab of the document sets ribbon, how to add functionality to the button, and how to export document sets so that they can be downloaded as a single ZIP file. C#

User Profiles and Social Data Code Samples

Name Description Language
Social Data Statistics Web Part The Social Data Statistics Web Part displays social data statistics. C#
Colleague Approval Social Tagging Application Page The Colleague Approval Social Tagging Application page is an application page that lists your colleagues and enables you to note approval of each colleague by selecting a check box. C#
Multicasting Activity Events Console Application This sample demonstrates how to use the new Activity Feed object model in Microsoft SharePoint Server 2010 to create and multicast activity events. C#
Send a Link to Your Colleagues Activity Event This sample demonstrates how to create ActivityType objects and ActivityEvent objects, and how to insert new ActivityEvent objects into the newsfeeds of users. C#
SharePoint-to-LinkedIn Connector This sample demonstrates how to add social data from other social networking sites to your MySite, how to create and use new user profile properties, and how to implement new timer jobs that are managed on your SharePoint Central Administration site. C#
Microsoft SharePoint Server 2010: Activity Events for Document Libraries This sample demonstrates how to create and publish activity events whenever a user adds a document to a document library. It also demonstrates how to create a timer job that runs under an account that has User Profile Service Application administrative privileges in order to insert activity events into other users' activity feeds. C#

Visio Web Access Web Part in Visio Services Samples

Name Description Language
Annotations The Annotations sample shows how to annotate a Web drawing page in two ways: by using shape overlays and by using shape highlights. ECMAScript
Custom Error Messages The Custom Error Messages sample shows how to use the Visio Web Access Web part to display and hide custom HTML error messages. ECMAScript
Mouse Interaction The Mouse Interaction sample shows how to declare event handlers for the various Visio Web Access mouse-related events, and how to handle these events when they occur. ECMAScript

Programming Word Automation Services

Name Description Language
Creating a Web Part That Uses Word Automation Services This walkthrough shows how to initiate Word Automation Services document conversions using a SharePoint Server 2010 Web Part. C#
Use an Edit Control Block Menu Item to Create a Conversion Job This walkthrough shows how to create a solution that initiates a document conversion from the document context menu in SharePoint Server 2010. C#
Create a Workflow to Archive Documents Using Word Automation Services This walkthrough shows how to create a SharePoint Server 2010 Workflow that archives a Word document to an XPS file based on the status of the document. C#

PerformancePoint Services Code Samples

Name Description Language
Custom Report, Filter, and Tabular Data Source Objects This sample is designed to show how to create custom report, filter, and tabular data source extensions for PerformancePoint Services. C#
Custom Scorecard Transforms This sample is designed to show how to create custom scorecard transforms that modify the appearance, contents, or functionality of a PerformancePoint Services scorecard view. C#

Excel Services Code Samples

Name Description Language
Developing a Custom Application Using Excel Web Services This walkthrough describes the process for accessing Excel Web Services from an application created with Microsoft Visual C#. C#
Developing a Managed-Code UDF This walkthrough describes the process for developing Excel Services user-defined functions (UDFs) using Microsoft Visual C#. C#
Developing Using the Content Editor Web Part The walkthrough in this section describes the process for interacting with the ECMAScript (JavaScript, JScript) object model in Excel Services by using the Content Editor Web Part. C#
Programmatically Add an Excel Web Access Web Part to a Page This example shows how to programmatically add an Excel Web Access Web Part to a SharePoint page. It also shows you how to display an Excel workbook programmatically in an Excel Web Access Web Part. C#
Sample URI For Excel Services REST API This topic lists sample URIs for the representational state transfer (REST) service commands in Excel Services. REST
Basic URI Structure and Path This topic explains how to construct the URI structure and path for REST service commands in Excel Services. REST
Last edited Nov 19 2010 at 12:49 AM  by jamescro, version 13
Comments
moontear wrote  Oct 18 2010 at 3:32 PM  
I am missing "Programming Word Automation Services, PerformancePoint Services Code Samples, Excel Services Code Samples" from the SDK download. Are they still being revised? Why doesn't it say so on this page then?

sahridhayan wrote  Oct 22 2010 at 6:31 AM  
Why not SharePoint 2010 sandbox related samples can be part of this section too?

Updating...
Page view tracker