module share point for internet sites

Upload: javier-castro

Post on 07-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 Module Share Point for Internet Sites

    1/36

    Microsoft Virtual LabsModule 3: SharePoint for InterneSites - Developer Introduction

    C#

  • 8/4/2019 Module Share Point for Internet Sites

    2/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#Table of Contents

    Module 3: SharePoint for Internet Sites - Developer IntroductionC# ................................. 1Exercise 1 Developing a Custom Field Type for SharePoint .................. .......... ........... .......... ........... .......... .......... ........ 2Exercise 2 Developing a Custom Content Type for SharePoint .......... ........... .......... ........... .......... ........... .......... ......... 12Exercise 3 Developing a Web Part for SharePoint ......... ........... .......... ........... .......... ........... .......... ........... .......... ......... 20Exercise 4 Enhancing a Custom SharePoint Web Part ................................................................................................ 27

  • 8/4/2019 Module Share Point for Internet Sites

    3/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 1 of 34

    Module 3: SharePoint for Internet Sites -

    Developer IntroductionC#

    ObjectivesAfter completing this lab, you will be better able to: Create a simple Custom Field Type Create a Content Type that uses a Site Column based on a custom Field

    Type.

    Create a simple Web Part. Extend the Web Part to integrate it with other SharePoint assets.

    ScenarioIn order to provide some context for this exercise, you are a developer building

    an Internet site for Adventure Works, a Travel company. One of the requirements

    is to be able to display travel specials and allow site visitors to book these travel

    specials on the site while allowing the content to be easily maintained by

    Adventure Works staff. In order to meet these requirements, you have decided to

    build a SharePoint site based on the Publishing Site template.

    Estimated Time to

    Complete This Lab60 Minutes

    Computers used in this

    LabIMAGE014-5

    The password for the Administrator account on all computers in this lab is:

    pass@word1

  • 8/4/2019 Module Share Point for Internet Sites

    4/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 2 of 34

    Exercise 1

    Developing a Custom Field Type for SharePoint

    Scenario

    In this exercise, you will develop and deploy a custom SharePoint Field Type. This custom Field Type will be storepromotion codes.

    Tasks Detailed Steps

    Complete the following

    tasks on:

    IMAGE014-5

    1. Create a SharePointSolution

    Note:In this task a solution and project will be created. It will contain the rest of the

    development work in this lab.

    a. Open Visual Studio 2008 by going to the Start Menu | All Programs | MicrosoftVisual Studio 2008 | Microsoft Visual Studio 2008.

    b. From the menu, select File | New | Project.c. In the New Project dialog box, select the Visual C# SharePoint project type and

    select the Empty template.

    d. Enter Promo_Field_Type for the Name.e. Enter C:\SPHOLS\Labs\Lab 01 for the Location.f. Enter Promo_Field_Typefor the Solution Name.

    g. ClickOk. The Promo_Field_Type project can now be seen in the solution folder.h. Select Project | Promo_Field_TypeProperties from the Visual Studio menu.i. Select the Application tab.Note: Steps 10 & 11 are shown to demonstrate how to conform to Microsofts

    Namespace Naming guidelines. Seehttp://msdn.microsoft.com/en-

    us/library/893ke618.aspxfor more information.

    j. Change the Assemblyname to AdventureWorks.SharePoint.PromoFieldType.k. Change the Default namespace to AdventureWorks.SharePoint.

    http://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    5/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 3 of 34

    Tasks Detailed Steps

    Note: Steps 12-16 are optional, however, they show a convient way to retrieve an

    assemblys public key which is often required in various XML fibles.

    l. Select Tools | External Tools from the Visual Studio menu.m. ClickAdd.n. Enter the following values:

    Title: Get Assembly Public Key Command: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\sn.exe Arguments: -Tp $(TargetPath)

    o. CheckUse Output windowp. ClickOK

    2. Add Field TypeClass

    Note: This task will add the base field type class and then build the project to generate

    an assembly public key token which is necessary for completing the field type

    definition file in the following task.

    a. Select the Promo_Field_Type project in the Solution Explorer.b. From the Visual Studio menu, select Project | Add New Item.c. Select the Visual C# SharePoint category.d. Select the Field Control template and name it PromoCode.e. ClickAdd. Observe that Visual Studio adds two classes (PromoCode.Field.cs and

    PromoCode.FieldControl.cs) and a field type definition file

    (fldtypes_PromoCode.xml).f. Press F6 to build the project.

    3. Complete the FieldType Definition

    Note: The field type definition file is used to make SharePoint aware of the field type

    and provide initial configuration information. Additionally, this file contains

    rendering information that is used to render the field when it is displayed in list or

    display mode.

    a. Double-click on the fldtypes_PromoCode.xml file in the Solution Explorer.b. Edit the field type definition file as follows.

  • 8/4/2019 Module Share Point for Internet Sites

    6/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 4 of 34

    Tasks Detailed Steps

    PromoCode

    Text

    Promo CodePromotional Code

    for Travel Specials

    TRUE

    TRUE

    TRUE

    TRUE

    TRUE

    AdventureWorks.SharePoint.PromoCodeField, AdventureWorks.SharePoint.PromoFieldType,Version=1.0.0.0, Culture=neutral,PublicKeyToken=9f4da00116c38ec5

    c. From the Visual Studio menu, select Tools | Get Assembly Public Key.d. Replace the public key token in the FieldTypeClass node with the public key token

    shown in the Output window.

    e. Select File | Save All to save your work.4. Initial changes to the

    field type class

    Note: The field type class is the hub of all things related to a field type. When you

    added the field type class in task two, Visual Studio automatically associated the field

    control class with the field type class by adding a reference to it in the

    FieldRenderingControl property.

    a. Double-click on the PromoCode.Field.cs file in the Solution Explorer. Observethat the class is derived from SPFieldText. All f ield types must derive from

    SPField or a class derived from SPField.

    b. Update the namespace from Promo_Field_Type to

  • 8/4/2019 Module Share Point for Internet Sites

    7/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 5 of 34

    Tasks Detailed Steps

    AdventureWorks.SharePoint.

    c. Override GetValidatedString to add custom validation to the field type. Add thefollowing method to the PromoCodeField class.

    public override string GetValidatedString(object value)

    {

    // See if a field value is required and if it is,// make sure that a value was supplied.

    if((this.Required == true)

    &&

    ((value == null)

    ||

    ((String) value == "")))

    {

    throw new SPFieldValidationException(this.Title+ " must have a value.");

    }

    else

    {

    return base.GetValidatedString(value);

    }

    }

    5. Add a ValidationRule class

    Note:At this point, you have implemented GetValidatedString, but havent added any

    custom validation other than ensuring that a value is supplied when required. In this

    task youll add a class to perform the required validation for the promo code field

    type.

    a. From the Visual Studio menu, select Project | Add Class.b.

    Name the class PromoValidationRule.cs.

    c. ClickAdd.d. Change the namespace to AdventureWorks.Windows.Controls.e. The class needs to derive from ValidationRule which is found in the

    PresentationFramework.dll. Select Project | Add Reference.

    f. Select PresentationFrameworkfrom the .NET tab. If it isnt listed browse for itin the C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0 folder.

    g. ClickOK.h. Insure you have the required namespaces:

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.Text.RegularExpressions;

    using System.Windows.Controls;

    using System.Globalization;

    i. Change the class declaration from class PromoValidationRule topublic class PromoValidationRule : ValidationRule

    j. Add an override for the Validate method:

  • 8/4/2019 Module Share Point for Internet Sites

    8/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 6 of 34

    Tasks Detailed Steps

    public override ValidationResult Validate(object value,CultureInfo cultureInfo)

    {

    String promoCode = (String)value;

    String errorMessage;

    bool isValid = false;

    // Check #1: Is the promo code in the correctformat?

    Regex rxPromoCode = new Regex(@"[A-Za-z]{3}-[0-9]{4}\b");

    if(!rxPromoCode.IsMatch(promoCode))

    {

    errorMessage = "A promo code must have thisstructure: XXX-YYYY "

    + "where XXX is a 3 letter

    supplier code and YYYY is "+ "a 4 digit offer identifier.";

    }

    else

    {

    // Check #2: Is the supplier code valid?

    // For brevity's sake, assuming only twosuppliers: ABC and DEF.

    // Of course you could do other validation hereagainst a

    // database, a SharePoint list, or some other

    data source// and/or algorithm.

    if (promoCode.StartsWith("abc",StringComparison.CurrentCultureIgnoreCase)

    || promoCode.StartsWith("def",StringComparison.CurrentCultureIgnoreCase))

    {

    isValid = true;

    errorMessage = "The promo code is valid.";

    }

    else

    {

    errorMessage = "Invalid supplier code:Valid supplier codes "

    + "include ABC and DEF.";

    }

    }

  • 8/4/2019 Module Share Point for Internet Sites

    9/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 7 of 34

    Tasks Detailed Steps

    return new ValidationResult(isValid, errorMessage);

    }

    6. Finish the field typeclass

    Note:Now that the PromoValidationRule class is complete, it is time to finish the

    GetValidatedString method in the PromoField field type class.

    a. Switch back to the PromoCode.Field.cs file.b. Add a namespaces to the PromoCodeField class

    using AdventureWorks.Windows.Controls;

    using System.Windows.Controls;

    using System.Globalization;

    c. Replace return base.GetValidatedString(value); in the else clause ofthe GetValidatedString method with the following code:

    PromoValidationRule rule = new PromoValidationRule();

    ValidationResult result = rule.Validate(value,CultureInfo.InvariantCulture);

    if (!result.IsValid)

    {

    throw newSPFieldValidationException((String)result.ErrorContent);

    }

    else

    {

    return base.GetValidatedString(value);

    }

    7. Finish the fieldcontrol class

    Note: The final development task is to complete the PromoCodeFieldControl class.

    This class is responsible for providing the UI for the field when in edit mode or whencreating a new item. This control can optionally leverage a Field Rendering Control

    which allows you to declaratively define the editing experience. Since this example

    will use a rendering control, this task begins with creating the rendering control.

    a. Select the Promo_Field_Type project in the Solution Explorer.b. Select Project | Add New Item.c. Select the Text File template and name it PromoFieldControl.ascx.d. View the Properties associated with the PromoFieldControl.ascx file.e. Change the Build Action property to None.f. Add the following code to the PromoFieldControl.ascx file:

  • 8/4/2019 Module Share Point for Internet Sites

    10/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 8 of 34

    Tasks Detailed Steps

    Namespace="Microsoft.SharePoint.WebControls" %>

    g. Observe the IDs of the RenderingTemplate (PromoFieldControl), the Label(PromoCodePrefix), and the TextBox (TextField).

    h. Save and close the PromoFieldControl.ascx file.i. Open the PromoCode.FieldControl.cs file.

    j. Change the namespace from Promo_Field_Type toAdventureWorks.SharePoint.WebControls

    k. In addition to the existing namespaces, add the namespace:using System.Web.UI.WebControls;

    l. Just underneath the class declaration, add a Label member namedPromoCodePrefix:

    protected Label PromoCodePrefix;

    m. Add an override for the DefaultTemplateName property:protected override string DefaultTemplateName

    {

    get

    {

    return "PromoFieldControl";

    }

    }

    n. Add an override for the CreateChildControls method:protected override void CreateChildControls()

    {

    // If the page isn't in Edit mode, don't render...

    if (this.Field == null ||

    this.ControlMode == SPControlMode.Display ||

    this.ControlMode == SPControlMode.Invalid)

    return;

    base.CreateChildControls();

    this.PromoCodePrefix = (Label)TemplateContainer

    .FindControl("PromoCodePrefix");

  • 8/4/2019 Module Share Point for Internet Sites

    11/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 9 of 34

    Tasks Detailed Steps

    this.textBox =(TextBox)TemplateContainer.FindControl("TextField");

    if (!this.Page.IsPostBack)

    {if (this.ControlMode == SPControlMode.New)

    {

    textBox.Text = "";

    }

    }

    }

    o. Finally, add an override for the Value property as:public override object Value

    {

    get{

    EnsureChildControls();

    return base.Value;

    }

    set

    {

    EnsureChildControls();

    base.Value = (String)value;

    }

    }

    p. Since the namespace for this class was changed in step 23 above, switch over tothe PromoCodeField class (PromoCode.Field.cs) and import the namespace:

    using AdventureWorks.SharePoint.WebControls;

    8. Build and Deploy theField Control

    Note: The final task involves building the control and deploying the pieces to the

    appropriate places.

    a. Build the project (press F6) and correct and compile errors as necessary until theproject compiles without error.

    b. Select Project | Promo_Field_Type Properties.c. Select the Build Events tab.d. ClickEdit Post-build.e.

    Add the following commands:

    Note:Notice that _ indicates line continuation do not add these characters. Also,

    a line break has been inserted between commands here for readability.

    cd "$(ProjectDir)"

    "%programfiles%\MicrosoftSDKs\Windows\v6.0A\Bin\gacutil" _

    /i "$(TargetPath)" /nologo /f

  • 8/4/2019 Module Share Point for Internet Sites

    12/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 10 of 34

    Tasks Detailed Steps

    %systemroot%\system32\iisreset.exe

    xcopy *.ascx "C:\Program Files\Common Files\MicrosoftShared\ _

    web server extensions\12\TEMPLATE\CONTROLTEMPLATES\" /y

    xcopy Templates\xml\fldtypes*.xml "C:\ProgramFiles\Common Files\ _

    Microsoft Shared\web serverextensions\12\TEMPLATE\XML\" /y

    Note: Step e performs the following actions. After changing to the project directory, it

    adds the project assembly to the GAC. Next, it recycles IIS.

    f. Select File | Save All.g. In Visual Studio, open the web.config associated with SharePoint. For example,

    C:\Inetpub\wwwroot\wss\VirtualDirectories\www.Adventureworks.com80\we

    b.config.h. Add the following SafeControl entries, replacing the PublicKeyToken value with

    the PublicKeyToken from your project (as determined in Task 3, step c above).

    i. Save and close the web.config file.j. Press F6 to build the project and deploy to SharePoint.

    9. Test the Field Type a. Open Internet Explorer.b. Browse tohttp://www.adventure-works.com/_layouts/viewlsts.aspx.c. For testing purposes, create a new list. ClickCreate on the menu bar.d. Select Custom List.

    Name: Destinations Display this list on the Quick Launch?: No

    e. ClickCreate.f. Select Settings | Create Column.

    Column Name: Destination Require that this column contains information: Yes

    http://www.adventure-works.com/_layouts/viewlsts.aspxhttp://www.adventure-works.com/_layouts/viewlsts.aspxhttp://www.adventure-works.com/_layouts/viewlsts.aspxhttp://www.adventure-works.com/_layouts/viewlsts.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    13/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 11 of 34

    Tasks Detailed Steps

    g. ClickOK.h. Select Settings | Create Column.i. Observe that there is a column type with the description Promotional Code for

    Travel Specials.

    j. For the new column, enter the name Promo Code.k. Select Promotional Code for Travel Specials.l. Set Require that this column contains information to Yes.m. ClickOK.n. Back in list view, observe that the column is added to the list.o. Select New | New Item. Test that the value is required by leaving the Promo Code

    field empty.

    Title: Auckland Destination: Auckland, New Zealand Promo Code:

    p. ClickOK. Observe that the field is required and the your custom exceptionmessage appears.

    q. Enter AAAA-12345 in the Promo Code field. This is an invalid format.r. ClickOK. Observe that a message appears detailing the correct format for a promo

    code.

    s. Enter AAA-1234 in the Promo Code field. This is an invalid supplier.t. ClickOK. Observe that a message appears noting the invalid supplier code.u. Enter ABC-1234 in the Promo Code field. This is a valid promo code.v. ClickOK. Observe that the value is validated and the item displays in the list view

    with the prefix Promo Code.

  • 8/4/2019 Module Share Point for Internet Sites

    14/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 12 of 34

    Exercise 2

    Developing a Custom Content Type for SharePoint

    Scenario

    In this exercise, you will develop and deploy a custom SharePoint Content Type. This custom Content Type willprovide a schema for individual travel specials.

    Tasks Detailed Steps

    Complete the following

    tasks on:

    IMAGE014-5

    1. Create a SharePointSolution

    Note:In this task a solution and project will be created. It will contain the rest of the

    development work in this exercise.

    a. Close any open Visual Studio 2008projects. If Visual Studio 2008 isnt alreadyopen, open Visual Studio 2008 by going to the Start Menu | All Programs |

    Microsoft Visual Studio 2008 | Microsoft Visual Studio 2008.

    b. From the menu, select File | New | Project.c. Since this exercise will not contain compiled code, select an Empty template. This

    can be accomplished by selecting Visual C# as a Project type and then Empty asa Template.

    d. Name the project TravelFeature.e. Set the Location to C:\SPHOLS\Labs\Lab 01.f. ClickOK.Note:In order to keep things organized, many developers prefer to organize the

    project directory structure in a way that reflects how the SharePoint hive is organized.

    g. With the TravelFeature project selected in the Solution Explorer, choose Project |New Folder.

    h. Name the folder TEMPLATE.i. With the TEMPLATE folder selected the Solution Explorer, choose Project |

    New Folder.j. Name the folder FEATURES.k. With the FEATURES folder selected the Solution Explorer, choose Project |

    New Folder.

    l. Name the folder TravelFeature.m. With the TravelFeature folder selected the Solution Explorer, choose Project |

    Add New Item.

    n. Select the XML File template.o. Name the file feature.xml.p. ClickAdd.

    2. Define the Feature Note:A feature is defined via a Feature element within the feature.xml file. Thefeature element contains attributes such as Id, Title, Description and Scope amoung

    other possibilities. In the following steps you will define these attributes within the

    feature.xml file.

    a. Add the following XML to the feature.xml file underneath the xml node:

  • 8/4/2019 Module Share Point for Internet Sites

    15/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 13 of 34

    Tasks Detailed Steps

    Title="Travel Feature"

    Description="A feature for creating travelspecials"

    Hidden="FALSE"

    Scope="Site">

    b. Select the TO DO text next to the Id element.c. Select Tools | Create GUID from the Visual Studio menu.d. Select the Registry Format.e. ClickCopy.f. ClickExit.g. Press Ctrl+V to paste the newly created GUID as the value for the Id attribute.Note:Rather than put all of a features CAML in one big file, the Feature element

    allows you to reference other XML files that define the elements that make up the

    feature. Reference these files by including one or more ElementManifest elements

    within an ElementManifests node. The TravelSpecial feature will use a single file to

    define the features elements.h. Add an ElementManifests and ElementManifest node to the feature.xml file. Add

    the following XML within the node.

    3. Define the Feature Note: The substance of the TravelSpecial feature is the CAML that defines necessarysite columns and the content type which will serve as the schema for a travel special.

    This CAML will reside in a file named elements.xml. In this task you will create the

    elements.xml file.

    a. Select the TravelFeature folder in the Solution Explorer.b. Select Project | Add New Item.c. Select the XML File template.d. Name the file elements.xml.e. Add an Elements node:

    f. Add a site column definition for the Special Overview field inside of the Elementsnode.

  • 8/4/2019 Module Share Point for Internet Sites

    16/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 14 of 34

    Tasks Detailed Steps

    ReadOnly="FALSE"

    Sealed="FALSE"

    Hidden="FALSE"

    />

    g. Replace the TO DO placeholder for the ID attribute with a new GUID. See steps B- G in Task 2 above for reference.

    h. Add a site column definition for the Special Details field below the SpecialOverview Field node.

    i. Replace the TO DO placeholder for the ID attribute with a new GUID. See steps B- G in Task 2 above for reference.

    j. Add a site column definition for the Special Narrative field below the SpecialDetails Field node.

    k. Replace the TO DO placeholder for the ID attribute with a new GUID. See steps B- G in Task 2 above for reference.

    l. Add a site column definiton for the Special Promo Code field below the SpecialNarrative field node. Note that this site column definition PromoType that was

    created in Exercise 1.

  • 8/4/2019 Module Share Point for Internet Sites

    17/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 15 of 34

    Tasks Detailed Steps

    DisplayName="Promotional Code"

    Group="AdventureWorks"

    Type="PromoCode"

    Required="TRUE"

    ReadOnly="FALSE"

    Sealed="FALSE"Hidden="FALSE"

    />

    m. Replace the TO DO placeholder for the ID attribute with a new GUID. See steps B- G in Task 2 above for reference.

    n. Define the Travel Special content type by adding a ContentType node after the lastField node from step L above.

    o. Select the place holder text that is part of the IDattribute.

    p. Tools | Create GUID.q. ClickCopy.r. ClickExit.s. Press Ctrl+V to copy the new GUID over the place holder text.t. Delete the curly braces and hypens from the GUID.Note: Content Type IDs consist of an ID created using 1 of 2 conventions. The first

    convention is to create an ID that consists of the content types parent content ID

    concantenated with a 2-digit hex value other than 00. The second convention is to

    create an ID based on the content types parent ID (and that parents ancestors) + 00

    + a GUID with no curly braces or hypens. The parent ID used in the example above is

    based on a Page content type.

    u. Update the IDs associated with each FieldRef item so that it matches thecorresponding GUID associated with the site column.

    v. File | Save All.

  • 8/4/2019 Module Share Point for Internet Sites

    18/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 16 of 34

    Tasks Detailed Steps

    4. Deploy the Feature Note:In this task you will deploy the Travel Special feature by copying theTravelFeature folder to the appropriate SharePoint directory and then install and

    activate the feature using STSADM.EXE.

    a. Open Windows Explorer.b. Copy the TravelFeature folder (C:\SPHOLS\Labs\Lab

    01\TravelFeature\TravelFeature\TEMPLATE\FEATURES\TravelFeature)

    containing the elements.xml and feature.xml files.

    c. Paste the folder in the SharePoint FEATURES folder: C:\ProgramFiles\Common Files\Microsoft Shared\web server

    extensions\12\TEMPLATE\FEATURES\.

    d. Open a Command Prompt window. (Choose Start | Run, enter cmd, and clickOK).

    e. Enter cd C:\Program Files\Common Files\Microsoft Shared\web serverextensions\12\BIN.

    f. Press Enter.g. Install the feature by entering: stsadmo installfeaturename TravelFeatureh. Press Enter.i. Activate the feature by entering: stsadmo activatefeaturename

    TravelFeatureurl http://www.adventureworks.com

    j. Press Enter.5. Create a Page

    Layout Using the

    Travel Special

    Content Type

    Note:At this point you have created a custom field type, defined site columns, and

    created a Travel Special content type. To leverage these items in a Publishing site, the

    next task is to create a Page Layout based on the Travel Special content type. In this

    task, you will see how all the elements come together by creating an elementary Page

    Layout and then creating a simple page using the Page Layout that is associated with

    the Travel Special content type.

    a. Open Microsoft Office SharePoint Designer.b. Select File | Open Site.c. Enterhttp://www.adventureworks.comas the Site name.d. ClickOpen.e. Select File | New | SharePoint Content.f. Select SharePoint Publishing and Page Layout.g. Use the following options:

    Content Type Group: AdventureWorks Content Type Name: TravelSpecial URL Name: TravelSpecialPage.aspx Title: Travel Special Page

    h. ClickOK.

    http://www.adventureworks.com/http://www.adventureworks.com/http://www.adventureworks.com/http://www.adventureworks.com/
  • 8/4/2019 Module Share Point for Internet Sites

    19/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 17 of 34

    Tasks Detailed Steps

    i. Select the place holder named PlaceHolderMain (Custom) on the design surface.

    j. Double-click on Title from the Page Fields group in the Toolbox. SharePointDesigner adds a Title Field control to the Page Layout design surface.

    k. Add a couple of line breaks by double-clicking on the Break item in the Tagsgroup of the toolbox (at the top of the Toolbox).

    l. Double-click on Description from the Page Fields group in the Toolbox.m. Add a couple of line breaksn. Double-click on Special Overview from the Content Fields group in the Toolbox.o. Add a couple of line breaksp. Double-click on Special Details from the Content Fields group in the Toolbox.q. Add a couple of line breaksr. Double-click on Promotional Code from the Content Fields group in the

  • 8/4/2019 Module Share Point for Internet Sites

    20/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 18 of 34

    Tasks Detailed Steps

    Toolbox.

    Note: SharePoint Designer will display an error displaying the custom field control in

    design-time preview mode. To provide design-time preview, the control must

    implement the Microsoft.SharePoint.WebControls.IDesignTimeHtmlProvider

    interface which is outside the scope of this exercise.

    s. Add a couple of line breakst. Double-click on Special Narrative from the Content Fields group in the Toolbox.

    u. Press Ctrl+S to save the file.v. Close SharePoint Designer.

    6. Test the ContentType and Page

    Layout in a

    Publishing Site

    Note: The final task is to test the Feature in a Publishing Site by associating the

    Travel Special content type with a Pages document library in a publishing site and

    then create a new page using the Travel Special Page Layout.

    a. Open Internet Explorer.b. Navigate tohttp://www.adventureworks.com/_layouts/newsbweb.aspx.c. Create a site with the following settings:

    Title: Specials URL name: specials Template: Adventure Works Destination Guide Site Use the top link bar from the parent site? No

    d. ClickCreate.e. Once in the new Travel Specials site, clickView All Site Content.f. Click on the Pages document library.g. Select Settings | Document Library Settings.h. Under Content Types, click on Add from existing site content typesi. Select the Travel Special Site Content Type.

    j. ClickAdd.k. ClickOK.

    http://www.adventureworks.com/_layouts/newsbweb.aspxhttp://www.adventureworks.com/_layouts/newsbweb.aspxhttp://www.adventureworks.com/_layouts/newsbweb.aspxhttp://www.adventureworks.com/_layouts/newsbweb.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    21/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 19 of 34

    Tasks Detailed Steps

    l. Navigate back to the Pages library(http://www.adventureworks.com/specials/Pages/Forms/AllItems.aspx).

    m. ClickNew to create a new page. Title: Sample Travel Special URL Name: SampleTravelSpecial

    Page Layout: (Travel Special) Travel Special Pagen. ClickCreate.o. Click on SampleTravelSpecial to open the new page.p. ClickEdit Page.

    Title: New Zealand Special Offer Description: Save big on your New Zealand vacation! Special Overview: Buy one 7 day tour and get a second for half-price! Special Details: Enter any random text. Promotional Code: ABC-1234 Special Narrative: Enter any random text.

    q. ClickPublish

    http://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    22/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 20 of 34

    Exercise 3

    Developing a Web Part for SharePoint

    Scenario

    In this exercise, you will develop and deploy a custom Web Part for SharePoint. This Web Part will provide providefunctionality to simulate an elementary travel booking process.

    Tasks Detailed Steps

    Complete the following

    tasks on:

    IMAGE014-5

    1. Create the Web PartSolution

    a. Open Visual Studio 2008 by going to the Start Menu | All Programs | MicrosoftVisual Studio 2008 | Microsoft Visual Studio 2008.

    b. From the menu, select File | New | Project.c. In the New Project dialog box, select the Visual C# Windows project type and

    select the Class Library template.

    d. Enter BookingWebPart for the Name.e. Enter C:\SPHOLS\Labs\Lab 01 for the Location.f. Enter BookingWebPart for the Solution Name.g. ClickOK.h. Select Project | BookingWebPart Properties from the Visual Studio menu.i. Select the Application tab.Note: Steps j & kare shown to demonstrate how to conform to Microsofts Namespace

    Naming guidelines. Seehttp://msdn.microsoft.com/en-us/library/893ke618.aspxfor

    more information.

    j. Change the Assembly name toAdventureWorks.SharePoint.WebControls.BookingWebPart.

    k. Change the Default namespace to AdventureWorks.SharePoint.WebControls.l. Click on the Build Events tab.m. Add xcopy /y "*.dll"

    "C:\Inetpub\wwwroot\wss\VirtualDirectories\www.Adventureworks.com80\b

    in" to the Post-build event command line text box.

    n. Click on the Signing tab.o. CheckSign the assembly.p. Set Choose a strong name key file to .

    Key file name: BookingWebPart Protect my key file with a password: Uncheck

    q. Select File | Save All.r. Right-click on Class1.cs in the Solution Explorer.s. Select Properties.t. Change the File Name property to BookingWebPart.cs.u. Open the file AssemblyInfo.cs.v. Add the following attribute to allow the assembly to be called by partially trusted

    callers:

    [assembly:System.Security.AllowPartiallyTrustedCallers]

    w. Open the file BookingWebPart.cs.

    http://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspxhttp://msdn.microsoft.com/en-us/library/893ke618.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    23/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 21 of 34

    Tasks Detailed Steps

    x. Change the namespace from BookingWebPart toAdventureWorks.SharePoint.WebControls

    y. Select Project |Add Reference.z. On the .NET tab, highlight System.Web, Windows SharePoint Services,

    Windows SharePoint Services Security. Hold down CTRL to select multiple

    items.

    aa.ClickOK.bb.Add the following code to the top of the BookingWebPart.cs file to import

    necessary namespaces:

    using System.Web;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    cc. Change the class declaration from public class Class1 to public classBookingWebPart : WebPart

    dd. Add an override for CreateChildControls:protected override void CreateChildControls(){

    base.CreateChildControls();

    this.Controls.Add(new LiteralControl("FutureBooking Web Part."));

    }

    2. Deploy the basicWeb Part

    Note: Prior to proceeding with development of the Web Part, it is helpful to deploy the

    Web Part to ensure that you have all the components setup correctly.

    a. Press F6 to compile the assembly and copy the assembly to the bin directory as apost-build event.

    b. Select Tools | Get Assembly Public Key to retrieve the public key token for theassembly.

    c. Open the file:C:\Inetpub\wwwroot\wss\VirtualDirectories\www.adventureworks.com80\we

    b.config

    d. Add a SafeControl entry for the Web Part. Within the SafeControls node, add thefollowing

    Note: Replace the PublicKeyToken with your public key token:

    e. Save and Close the web.config file.f. Open Internet Exlorer and browse to

  • 8/4/2019 Module Share Point for Internet Sites

    24/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 22 of 34

    Tasks Detailed Steps

    http://www.adventureworks.com/_layouts/NewDwp.aspx.

    g. CheckAdventureWorks.SharePoint.WebControls.BookingWebPart.h. ClickPopulate Gallery.i. Browse to

    http://www.adventureworks.com/specials/Pages/Forms/AllItems.aspx.

    j. ClickNew. Title: Book Travel URL Name: BookTravel Page Layout: (Welcome Page) Blank Web Part Page

    k. ClickCreate.l. Click on the BookTravel link.m. ClickEdit Page.n. You should be on the BookTravel.aspx page in Edit mode now.o. ClickAdd a Web Part in the Header Web Part Zone.p. Scroll down the list of Web Parts to the Miscellaneous group and place a check

    mark next to BookingWebPart.

    q. ClickAdd.Note:Notice that the BookingWebPart is added to the zone.

    r. In the Edit drop-down menu associated with the BookingWebPart, select edit |Modify Shared Web Part.

    s. Observe that all of the default Web Part properties are available for modification.t. ClickOK.u. Select Page | Save and Stop Editing.

    3. Enhance the WebPart

    Note:Now that you have the Web Part plumbed and working, you can go back and

    add the required functionality. In this task you will add the necessary controls to the

    Web Part.

    a.

    Switch back to Visual Studio 2008.b. Open the BookingWebPart.cs file.c. At the top of the BookingWebPart class, add the following class level variables:

    DropDownList originDropDown;

    DropDownList destinationDropDown;

    DropDownList adultsDropDown;

    DropDownList childrenDropDown;

    TextBox promoTextBox;

    Button continueButton;

    d. Create and initialize the controls in the CreateChildControls() method.protected override void CreateChildControls()

    {

    base.CreateChildControls();

    // Drop Downs

    originDropDown = new DropDownList();

    originDropDown.Items.Add("Choose Origin City");

    originDropDown.Items.Add("Dallas, TX");

    http://www.adventureworks.com/_layouts/NewDwp.aspxhttp://www.adventureworks.com/_layouts/NewDwp.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/_layouts/NewDwp.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    25/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 23 of 34

    Tasks Detailed Steps

    originDropDown.Items.Add("Minneapolis, MN");

    originDropDown.Items.Add("New York, NY");

    originDropDown.Items.Add("Seattle, WA");

    this.Controls.Add(originDropDown);

    destinationDropDown = new DropDownList();destinationDropDown.Items.Add("Choose a Destination

    City");

    destinationDropDown.Items.Add("Auckland, NewZealand");

    destinationDropDown.Items.Add("Edinburgh,Scotland");

    this.Controls.Add(destinationDropDown);

    adultsDropDown = new DropDownList();

    childrenDropDown = new DropDownList();

    for (int i = 0; i

  • 8/4/2019 Module Share Point for Internet Sites

    26/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 24 of 34

    Tasks Detailed Steps

    writer.AddAttribute(HtmlTextWriterAttribute.Style,

    "font-weight: bold");

    writer.RenderBeginTag(HtmlTextWriterTag.Td);

    writer.Write(label);

    writer.RenderEndTag();

    writer.RenderBeginTag(HtmlTextWriterTag.Td);control.RenderControl(writer);

    writer.RenderEndTag();

    writer.RenderEndTag();

    }

    f. The final programming step in this task is to override the Render method asfollows:

    protected override void Render(HtmlTextWriter writer)

    {

    writer.WriteBreak();

    writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "5");

    writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");

    writer.AddAttribute(HtmlTextWriterAttribute.Style,"width:50%;");

    writer.RenderBeginTag(HtmlTextWriterTag.Table);

    // Row 1

    writer.RenderBeginTag(HtmlTextWriterTag.Tr);

    writer.AddAttribute(HtmlTextWriterAttribute.Style,

    "background-color: #99CCFF;font-weight: bold");

    writer.RenderBeginTag(HtmlTextWriterTag.Td);

    writer.Write("Vacation Specials");

    writer.RenderEndTag();

    writer.RenderBeginTag(HtmlTextWriterTag.Td);

    writer.Write("");

    writer.RenderEndTag();

    writer.RenderEndTag();

    // Rows 2-6

    RenderRow(writer, "Origin City:",(Control)originDropDown);

    RenderRow(writer, "Destination City:",(Control)destinationDropDown);

    RenderRow(writer, "Number of Adults:",

  • 8/4/2019 Module Share Point for Internet Sites

    27/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 25 of 34

    Tasks Detailed Steps

    (Control)adultsDropDown);

    RenderRow(writer, "Number of Children:",(Control)childrenDropDown);

    RenderRow(writer, "Promo Code:",(Control)promoTextBox);

    // Row 7

    writer.AddAttribute(HtmlTextWriterAttribute.Style,

    "background-color: #99CCFF");

    writer.RenderBeginTag(HtmlTextWriterTag.Tr);

    writer.RenderBeginTag(HtmlTextWriterTag.Td);

    continueButton.RenderControl(writer);

    writer.RenderEndTag();

    writer.RenderBeginTag(HtmlTextWriterTag.Td);

    writer.Write("");

    writer.RenderEndTag();

    writer.RenderEndTag();

    writer.RenderEndTag(); // table

    }

    g. Press F6 to build the assembly.h. Switch back to Internet Explorer and navigate to the page you created in step M of

    Task 2 above (BookTravel.aspx).

  • 8/4/2019 Module Share Point for Internet Sites

    28/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 26 of 34

    Tasks Detailed Steps

    i. Refresh the page to view the updated Web Part as shown in the image below.

  • 8/4/2019 Module Share Point for Internet Sites

    29/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 27 of 34

    Exercise 4

    Enhancing a Custom SharePoint Web Part

    Scenario

    In the previous exercise, you developed and deployed a custom Web Part for SharePoint. In this exercise, you willextend the Web Part by adding properties to the Web Part that allow content creators to configure the Web Part

    when they add it to a page. Additionally, youll interact with the SharePoint object model to populate the drop-down

    controls with an appropriate list of values.

    Tasks Detailed Steps

    Complete the following

    tasks on:

    IMAGE014-5

    1. Add configurableWeb Part properties

    Note:In this task you will add properties to the Booking Web Part that allows a page

    editor to specify default values for the part. Specifically, you will add properties that

    allow a page editor to set the default values for the origin city and the destination city.

    a. Switch back to the BookingWebPart project in Visual Studio.b. Define enumerations for Origin city and Destination city. Add the following code

    near the top of the BookingWebPart class:public enum OriginCity

    {

    None=0,

    Dallas=1,

    Minneapolis=2,

    NY=3,

    Seattle=4

    }

    public enum DestinationCity

    {

    None=0,

    Auckland=1,

    Edinburgh=2

    }

    c. Add two class variables to store the current default values for origin city anddestination city.

    OriginCity _originCityDefault = OriginCity.None;

    DestinationCity _destinationCityDefault =DestinationCity.None;

    d. Add a property named OriginCityDefault.[WebBrowsable(true),

    WebDisplayName("Default Origin City"),

    WebDescription("This property sets the defaultorigin city value."),

    Personalizable(PersonalizationScope.Shared)]

    public OriginCity OriginCityDefault

    {

  • 8/4/2019 Module Share Point for Internet Sites

    30/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 28 of 34

    Tasks Detailed Steps

    get { return this._originCityDefault; }

    set { this._originCityDefault = value; }

    }

    e. Add a property named DestinationCityDefault.[WebBrowsable(true),

    WebDisplayName("Default Destination City"),WebDescription("This property sets the default

    destination city value."),

    Personalizable(PersonalizationScope.Shared)]

    public DestinationCity DestinationCityDefault

    {

    get { return this._destinationCityDefault; }

    set { this._destinationCityDefault = value; }

    }

    f. Modify CreateChildControls() to set the default value for origin city. Locate theline of code this.Controls.Add(originDropDown);and add the following

    statement on the next line:

    originDropDown.SelectedIndex =(int)this._originCityDefault;

    g. Modify CreateChildControls() to set the default value for destination city. Locatethe line of code this.Controls.Add(destinationDropDown);and add the

    following statement on the next line:

    destinationDropDown.SelectedIndex =(int)this._destinationCityDefault;

    2. Test the Web Partproperties

    a. In Visual Studio press F6 to build the project. Since you configured a Post-Buildevent for the project to copy the assembly to the correct SharePoint application bin

    in the previous exercise, there arent any additional steps required to deploy your

    changes.b. Open Internet Explorer and navigate to the BookTravel.aspx page that you

    created in the previous exercise.

    c. From the BookingWebPart menu, select Edit | Modify Shared Web Part.d. Expand the Miscellaneous grouping.e. Set the Default Origin City to Minneapolis.f. Set the Default Destination City to Auckland.

  • 8/4/2019 Module Share Point for Internet Sites

    31/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 29 of 34

    Tasks Detailed Steps

    g. ClickOK.h. Select Page | Save and Stop Editing.i. Navigate away from the page (i.e.

    http://www.adventureworks.com/specials/Pages/Forms/AllItems.aspx).

    j. Navigate back to BookTravel.aspx and verify that the origin city defaults toMinneapolis and that the destination city defaults to Auckland.

    3. Create aDestinations List

    Note:In this task you will add a couple more items to the Destination List that you

    created in Exercise 1, Task 9. You will use this list in the next task to serve as the data

    source for the Destination City drop-down list in the Booking Web Part.

    a. In Internet Explorer, navigate tohttp://www.adventureworks.com/Lists/Destinations/AllItems.aspx.

    b. ClickNew and add an item as follows: Title: Edinburgh Destination: Edinburgh, Scotland Promo Code: DEF-1234

    c. ClickOK.d. ClickNew to add an item as follows:

    Title: Maui Destination: Maui, Hawaii Promo Code: DEF-1122

    4. Modify the WebPart to populate the

    Note: This task involves modifying the Booking Web Part so that values fro the

    Destination City drop-down list are retrieved from the Destinations list. This provides

    http://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspxhttp://www.adventureworks.com/Lists/Destinations/AllItems.aspxhttp://www.adventureworks.com/Lists/Destinations/AllItems.aspxhttp://www.adventureworks.com/Lists/Destinations/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/Forms/AllItems.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    32/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 30 of 34

    Tasks Detailed Steps

    Destination drop-

    down list with values

    from the

    Destinations list

    the ability for content creators to easily modify the destinations that are available in

    the Web Part without having an IT professional make programming changes or IT

    related tasks.

    a. ClickOK.b. Import the SharePoint namespace:

    Using Microsoft.SharePoint;

    c. Add a method for loading the Destination drop-down list:-private void LoadDestinations(DropDownListdestinations)

    {

    using (SPSite siteCollection = newSPSite("http://www.adventureworks.com"))

    {

    using( SPWeb web = siteCollection.OpenWeb())

    {

    string listName = "Destinations";

    SPList destinationsList = null;foreach (SPList list in web.Lists)

    {

    if (list.Title.Equals(listName,

    StringComparison.InvariantCultureIgnoreCase))

    {

    destinationsList = list;

    break;

    }

    }

    if (destinationsList != null)

    {

    foreach (SPListItem item indestinationsList.Items)

    {

    destinations.Items.Add(item["Destination"].ToString());

    }

    }

    }}

    }

    d. Modify CreateChildControls(). Locate the following five lines of code inside theCreateChildCntrols() method:

    destinationDropDown = new DropDownList();

    destinationDropDown.Items.Add("Choose a DestinationCity");

  • 8/4/2019 Module Share Point for Internet Sites

    33/36

  • 8/4/2019 Module Share Point for Internet Sites

    34/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 32 of 34

    Tasks Detailed Steps

    }

    if (destinationsList != null)

    {

    foreach (SPListItem item in

    destinationsList.Items){

    destinations.Items.Add(item["Destination"].ToString());

    }

    }

    }

    }

    }

    j. Modify CreateChildControls(). Locate the following five lines of code inside theCreateChildCntrols() method:

    destinationDropDown = new DropDownList();

    destinationDropDown.Items.Add("Choose a DestinationCity");

    destinationDropDown.Items.Add("Auckland, NewZealand");

    destinationDropDown.Items.Add("Edinburgh,Scotland");

    this.Controls.Add(destinationDropDown);

    k. Modify the five lines as follows:destinationDropDown = new DropDownList();

    destinationDropDown.Items.Add("Choose a Destination

    City");

    LoadDestinations(destinationDropDown);

    //destinationDropDown.Items.Add("Auckland, NewZealand");

    //destinationDropDown.Items.Add("Edinburgh,Scotland");

    this.Controls.Add(destinationDropDown);

    destinationDropDown.SelectedIndex =(int)this._destinationCityDefault;

    l. Press F6 to build the project.5.

    Test the Web Part

    a. In order to access the SharePoint object model from a Web Part, the Web Partmust have elevated priviliges. Open the file C:\Program Files\Common

    Files\Microsoft Shared\web server\

    extensions\12\CONFIG\wss_custom_wss_minimaltrust.config.

    b. Locate the line .

    c. Add an IPermission entry within this node:

  • 8/4/2019 Module Share Point for Internet Sites

    35/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#

    Page 33 of 34

    Tasks Detailed Steps

    on,

    Microsoft.SharePoint.Security,

    version=12.0.0.0,

    Culture=neutral,

    PublicKeyToken=71e9bce111e9429c"

    version="1"ObjectModel="True" />

    d. Type iisreset and press Enter.Note: There are three general ways to give Web Parts the permissions they need:

    deploy the assembly to the GAC to run under full trust, change the trust level in

    web.config to WSS_Medium from the default setting of WSS_Minimal, or create a

    custom trust level by modifying wss_minimaltrust.config with just enough trust to

    allow the code to work. Note that the third option can be performed by including the

    CAS permissions in the Web Parts deployment package.

    e. Switch back to Internet Explorer.f. Navigate to the page containing the Booking Web Part

    (http://www.adventureworks.com/specials/Pages/BookTravel.aspx).g. Click on the Destination City drop-down list. Observe that it contains the values

    from the Destinations list.

    h. Add a new item to the Destinations list. Navigate tohttp://www.adventureworks.com/Lists/Destinations/AllItems.aspx.

    i. ClickNew. Title: St. Thomas Destination: St. Thomas, Virgin Islands Promo Code: ABC-5555

    j. ClickOK.k. Navigate back to the page containing the Booking Web Part.l. Press F5 to refresh the page.m. Click on the Destination City drop-down list. Observe that it contains the value

    for St. Thomas.

    http://www.adventureworks.com/specials/Pages/BookTravel.aspxhttp://www.adventureworks.com/specials/Pages/BookTravel.aspxhttp://www.adventureworks.com/specials/Pages/BookTravel.aspxhttp://www.adventureworks.com/Lists/Destinations/AllItems.aspxhttp://www.adventureworks.com/Lists/Destinations/AllItems.aspxhttp://www.adventureworks.com/Lists/Destinations/AllItems.aspxhttp://www.adventureworks.com/specials/Pages/BookTravel.aspx
  • 8/4/2019 Module Share Point for Internet Sites

    36/36

    Module 3: SharePoint for Internet Sites - Developer IntroductionC#Tasks Detailed Steps