Loading

Sharepoint2010学习笔记--deploy silverlight in sharepoint

There are two ways to deploy the XAP file in SharePoint environment.
1, We can use SharePoint default location [\Templates\Layouts\ClientBin] and deploy the file there. Refer this location from the Silverlight web part.
2, We can use a SharePoint document library and deploy the file there. Refer this document library location file path while adding the silverlight web part.

Firstly,we will use the default location to deploy

 

  1. To deploy and test the code in SharePoint 2010 we need to use the SharePoint Silverlight web part [New web part added in this version].
  2. The silverlight web part default location is "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin". So, all the XAP files should be deployed to this location to use them in the silverlight web part.
  3. To make this process easier, we need to do below.
  4. Right click on Silverlight project -> propertiese -> Build -> change the output path to "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ClientBin".
  5. Build the solution and see the XAP generated in the ClientBin location. 
  6. Now, navigate to SharePoint site where you want to see the silverlight data, Edit page.
  7. Add silverlight web part to the page. 
  8. It will prompt you for the XAP file location: Type the url: "/_layouts/ClientBin/SP2010Silverlight_HelloWorld.xap".
  9. Now click on OK and you can see the silverlight web part on the page.

 

posted @ 2010-04-11 09:57  .net's  阅读(497)  评论(0)    收藏  举报