SharePoint 2010 : Sandbox Solution Part 3


Developing Solution in Sandbox
  1. Client Side
    1. Microsoft.SharePoint.Client DLL
    2. JavaScript
    3. Silver Light
  2. Web Part
    1. Full trust proxies
  3. InfoPath Forms
Microsoft Tools For Sandbox SolutionsVisual studio 2010 SharePoint Power Tools that contains visual web part. 



Sandboxed-compatible Visual Web Part 
This item template enables you to use a visual designer to create SharePoint web parts that can be deployed in a sandboxed solution for SharePoint 2010.



Sandboxed Compilation 
This extension displays build errors when you use types or members in a SharePoint 2010 sandboxed project which are not allowed in the SharePoint sandbox environment.  

Deploying Pages and Web Part

Steps are:
  1. Create  Sandboxed-compatible Visual Web Part deploy as sandbox solution.
  2. Create web part page placed sandbox web part on it.
  3. Save site as template
  4. Template import to new  Import SharePoint Solution Package project
  5. Sandboxed-compatible Visual Web Part contained by SPUserCodeWebPart
  6. Alternatively, Embed SPuserCodeWebpart in deployed page.
  7. Or, Derive Binary serialized web part
Here is the CAML of SPUserCodeWebPart 
<WebPartPages:SPUserCodeWebPart 
                                    runat="server" 
                                    Description="SandboxVisualWebPart Description"
                                    Title="Sandbox Visual WebPart" 
                                    AssemblyFullName="SandBoxSolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9e509d0b324ff3cb"
                                    SolutionId="aea4c835-2a64-422f-a0aa-f3342d9de1ac" 
                                    TypeFullName="SandBoxSolution.SandboxVisualWebPart.SandboxVisualWebPart">
                                    </WebPartPages:SPUserCodeWebPart>

Attached Code with this Post

SharePoint  Project contains 


OutPut of BasicPage.aspx
Change the library path in Element.xml file


Output





Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

STS CryptographicException Error : Key set does not exist

SharePoint 2016 JavaScript framework