SharePoint 2010 : Sandbox Solution Part 3
Developing Solution in Sandbox
- Client Side
- Microsoft.SharePoint.Client DLL
- JavaScript
- Silver Light
- Web Part
- Full trust proxies
- InfoPath Forms
Microsoft Tools For Sandbox Solutions : Visual 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:
- Create Sandboxed-compatible Visual Web Part deploy as sandbox solution.
- Create web part page placed sandbox web part on it.
- Save site as template
- Template import to new Import SharePoint Solution Package project
- Sandboxed-compatible Visual Web Part contained by SPUserCodeWebPart
- Alternatively, Embed SPuserCodeWebpart in deployed page.
- 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
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM6x4cMrgQ0rH9UDLsz5hzGxqdycXEQFsxjl_1Qr87Dgau1sDVzFwcQDi_rw83FqMt_5zGBIJU_xL6wd3e6JcIU6LZpsd3wHEnoCMPTizaWgfwLd6w_kidjErUx1hGBPvK9W9AnQIBDuI/s320/SharePointCode.PNG)
OutPut of BasicPage.aspx
Change the library path in Element.xml file
Output
SharePoint Project contains
OutPut of BasicPage.aspx
Change the library path in Element.xml file
Output
Comments
Post a Comment