Join Robert Bogue for an in-depth discussion in this video Getting data from SharePoint, part of Developing SharePoint Full Trust Solutions for SharePoint 2013.
- Let's take a look at what it means…to get data out of Sharepoint.…And so, in your example files,…in the Chapter 3 ClientAndData folder,…you'll find a ClientAndData solution file.…And when you open it, you'll have this project.…And in the DataWebPart,…it's a web part for displaying data,…so we're going to take a look at that,…so when we open it up…we'll see the kind of derive from WebPart that we expect,…we see a property, ListUrl,…which is appropriately declared…so that we can edit that as a web part property,…and then inside of CreateChildControls,…there's a little bit of magic happening.…
And first of all we put everything in a try-catch block…so that if we get an error we can capture that on the screen…versus throwing an exception.…We are going to get the serverRelativeListUrl,…and we're going to do that by looking at SPContext,…that is our current context in Sharepoint,…we're going to get the Current Web,…and it's ServerRelativeUrl.…And then we're going to tack on to that the ListUrl…that was provided by the user.…
If you've wanted to learn how to develop custom solutions on SharePoint—or you've been told that you need to develop a solution that integrates with SharePoint—this is the training you need. It's quick, to the point, and effective at helping new developers work with SharePoint code.
Robert Bogue shows how to create new web parts, access and update data in SharePoint, work with files, and create SharePoint artifacts: lists and libraries to store data, site-level features, files, etc. He also shows how to create sandbox solutions that do not affect the rest of the server environment, and discusses execution options for solutions, including in-page, quasi-page, and out-of-page execution.
- Define web parts.
- Explain how to interact with a web part.
- Recall how to help determine what declarative code and user code is.
- Identify which object allows you to get data from more than one list.
- Identify what class timer jobs are derived from.
- Recognize different types of event receivers.