Exercise 2: Deploy and Test in SharePoint Online

Task 1 – Package and Deploy to SharePoint Online

In this task, you will test the Visual Web Part sandboxed solution in SharePoint Online.

  1. In Solution Explorer, select SandboxVWP, right-click and select Package to package up the solution.
  2. Launch Internet Explorer and navigate to your SharePoint Online site.
  3. Click Site Actions and then select Site Settings.

  4. Click on the Solutions link in the Galleries section to view the site collection’s solution gallery.

  5. Click on the Solutions tab in the ribbon and click the Upload Solution button.

  6. Browse to C:\%Office365TrainingKit%\Labs\2.1\Source\Before\SandboxVWP\bin\Debug\SandboxVWP.wsp and click Open and OK.
  7. In the Solution Gallery – Activate Solution dialog, click the Activate button on the Ribbon to activate the solution.
  8. Browse to the Lab02 site.
  9. Click the Edit icon at the top of the page to put the page in Edit mode:

  10. Click the Insert tab in the Ribbon
  11. Click the Web PartRibbon button to insert the web part.

  12. Under Categories select Custom and under Web Parts select VisualWebPart1 Title and click Add to add the web part to the page.

    The web part is now added to the page and is ready to test.

  13. Click the Save button to save the changes you made to the page.

  14. To test the web part, select a list in the drop down list and click the Populate Grid! button.

    The grid should show the items from the list or a message that the list does not contain any items.

    Note:
    The web part should perform the same in SharePoint Online as it did in on-premise.