Join Robert Bogue for an in-depth discussion in this video Configuring Web Part properties, part of Developing SharePoint Full Trust Solutions for SharePoint 2013.
- Let's take a look at a way to make a web part interactive…by using properties.…We're going to go through the process of creating…a brand-new empty project again, and we're going to call…this one HelloYou.…It is a farm solution, and we're still using our dev site.…And then we're going to add our new item which is…our web part that we want.…New Item, Web Part.…And this one's going to be HelloYou.…Now this time, we're going to need a field…so that we have some data to hold.…
So we're going to do this new protected string…and it's going to be fldYourName,…and we'll default initialize that to SharePoint Developer.…And then we'll put a property around it.…It's going to be public string YourName.…And then we're going to do set and we're going to do…fldYourName = value.…So now we've got a property that doesn't really do much.…
First, let's get that output in our control here,…so we're going to do Controls add new LiteralControl,…and we're just going to directly output that,…or actually let's just do our Hello, YourName.…
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.