SharePoint 2010: Creating Web Parts to Read/Write Data to External Data Sources

Learn how to use Microsoft Visual Studio 2010 to create a Visual Web Part that uses a Microsoft Business Connectivity Services (BCS) external content type in Microsoft SharePoint Server 2010 to read and write data to the AdventureWorks sample database. This sample accompanies the

C# (39.5 KB)
 
 
 
 
 
4 Star
(5)
5,837 times
Add to favorites
8/10/2011
E-mail Twitter del.icio.us Digg Facebook
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{9882A381-38F0-4B98-8BC1-69E0DA3DF328}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>CustomerWebPart</RootNamespace>
    <AssemblyName>CustomerWebPart</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{BB1F664B-9266-4fd6-B973-E1E44974B511};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <SandboxedSolution>False</SandboxedSolution>
    <SignAssembly>true</SignAssembly>
    <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <UseVSHostingProcess>false</UseVSHostingProcess>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <UseVSHostingProcess>false</UseVSHostingProcess>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Microsoft.BusinessData, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.BusinessData.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Data" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="Microsoft.SharePoint" />
    <Reference Include="Microsoft.SharePoint.Security" />
    <Reference Include="System.Web" />
    <Reference Include="System.Web.Extensions" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="VisualWebPart1\VisualWebPart1.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="key.snk" />
    <None Include="VisualWebPart1\SharePointProjectItem.spdata">
      <SharePointProjectItemId>{e7ac341b-7197-44bb-91d5-368d4d96eacc}</SharePointProjectItemId>
    </None>
    <None Include="VisualWebPart1\VisualWebPart1.webpart" />
    <None Include="VisualWebPart1\Elements.xml" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="VisualWebPart1\VisualWebPart1UserControl.ascx">
      <SubType>ASPXCodeBehind</SubType>
    </Content>
    <Compile Include="VisualWebPart1\VisualWebPart1UserControl.ascx.cs">
      <DependentUpon>VisualWebPart1UserControl.ascx</DependentUpon>
      <SubType>ASPXCodeBehind</SubType>
    </Compile>
    <Compile Include="VisualWebPart1\VisualWebPart1UserControl.ascx.designer.cs">
      <DependentUpon>VisualWebPart1UserControl.ascx.cs</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <None Include="Package\Package.package">
      <PackageId>{ef46c78d-ab1a-4bfc-9ad1-246f643d78a8}</PackageId>
    </None>
    <None Include="Package\Package.Template.xml">
      <DependentUpon>Package.package</DependentUpon>
    </None>
    <None Include="Features\Feature1\Feature1.feature">
      <FeatureId>{84ed7998-7d42-412f-81ea-5589a1f58489}</FeatureId>
    </None>
    <None Include="Features\Feature1\Feature1.Template.xml">
      <DependentUpon>Feature1.feature</DependentUpon>
    </None>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" />
</Project>