This article will focus on how to create SharePoint 2010 Visual Web Parts as Sandboxed Solution. In the initial release of SP 2010, the Sandboxed Solution Architecture had restriction in terms of supporting Visual Web Parts in the Sandboxed environment. This has been fixed by the recent release of Visual Studio Power Tools for SharePoint 2010, which helps to create Visual Web Parts for Sandboxed environment.
Here are the steps below :-
File –> New –> Project –> Empty SharePoint Project
Then choose ‘ Deploy as Sandboxed Solution’.
Click ‘Finish’.
Add –> New Item –> Visual Web Part (Sandboxed)
Implement some arbitrary functionality inside the web part.
Right click on Solution Explorer –> Deploy
Now you can see the Sandboxed Solution available in the Solutions Gallery.
Caveat
Event though the Visual Studio Power Tools supports Sandboxed Solution, there are some caveats/limitations around that. The following are not supported.
1. SharePoint Web Controls and some advanced ASP.NET controls
2. Use of “<@ Assembly Src=” directive is not supported
3. Java Script debugging is not supported in Visual Studio.
Pingback: Visual Studio 2010 SharePoint Power Tools - My experiments with SharePoint, Azure and .NET using Visual Studio
Pingback: Create SharePoint 2010 Visual Web Parts as Sandboxed Solution with Visual Studio 2010 Power Tools - My experiments with SharePoint, Azure and .NET using Visual Studio
This is one of the best articles so far I have read online. No crap, just useful information. Very well presented. Its really helpful for beginner as well as developer. Thanks for sharing with us. Check out this link too its also assist in understanding of sharepoint.
http://mindstick.com/Articles/9e1d1fe1-7e51-4d01-86ec-f1f679631a7e/?Create%20and%20Deploy%20Visual%20WebPart%20in%20SharePoint%202010