Contents
This programming task describes how to create two connectable Web Parts: a Web Part that provides a string and another Web Part that consumes and displays the value of that string. This walkthrough illustrates the following tasks: Creating an interface to define the string that is being provided.
Applies to: SharePoint Foundation 2010 Web Parts are server-side controls that run inside the context of site pages in Microsoft SharePoint Foundation. There are many Web Parts available by default, and you can also build your own custom Web Parts in SharePoint Foundation. They are editable and configurable by users.
How to connect two web parts in Visual Studio?
The following procedure demonstrates how you can connect the two Web Parts. In Visual Studio, press F5. A browser window opens to the SharePoint server on the development computer. Click Site Actions, and then click More Options. In the Create page, click Web Part Page, and then click Create.
How are web parts built in ASP.NET?
ASP.NET Web Parts — These Web Parts are built on top of the ASP.NET Web Part infrastructure. The ASP.NET-style Web Parts have a dependency on System.Web.dll and must inherit from the WebPart base class in the System.Web.UI.WebControls.WebParts namespace.
What are the properties of a web part?
Properties that set or override an aspect of the Web Part’s underlying behavior. In some cases, these properties also affect the user interface (UI). Properties that modify the Web Part UI without setting or overriding underlying behavior.
The Web Part infrastructure in Microsoft SharePoint Foundation is built on top of the Microsoft ASP.NET Web Part infrastructure, and Web Parts that derive from the ASP.NETWebPart class are completely supported in SharePoint, including the ASP.NET connection model.
How to import a web part into SharePoint?
On the Page menu, point to Add Web Parts, and then click Browse. Select the Web Part to import from the Web Part List, and then click OK. Drag the Web Part to a Web Part zone on the page.
How to create a SharePoint project in 2010?
In the New Project dialog box, expand the SharePoint node under the language that you want to use, and then select the 2010 node. In the Templates pane, select Empty SharePoint Project.