Thursday, 15 November 2012

Visual Webpart for SandBox Solution in SharePoint 2010

Quick Tip

Can you use Visual Webpart for a sandbox solution in SharePoint 2010?

The answer is NO; you cannot since this is basically .ascx controls which needs to be stored in the "controlTemplate" folder and hence it should be a "Farm Solution".

Not to worry much..... MSDN has an answers to this, YES you can have Visual Webpart in a sandbox solution, all you need to do is to install the Visual Studio 2010 Power Tools and you will get a Visual Webpart for Sandbox Solution.

Here is the Link : 

There are certain limitations however you still can use it.... Happy developing !

Known Limitations

There are a few known limitations when using a sandboxed visual web part. These include:
•JavaScript debugging is not supported in Visual Studio, although client JavaScript debugging does work

•Debugging of inline ASP.NET code must be done in the generated code file rather the markup file

•Use of “<@ Assembly Src=” directive is not supported

•SharePoint web controls and some ASP.NET controls are not supported in the SharePoint sandboxed environment; if they are used on a sandboxed visual web part an error message similar to the following will be generated at build time:

• The type or namespace name 'Theme' does not exist in the namespace 'Microsoft.SharePoint.WebControls' (are you missing an assembly reference?)

No comments:

SharePoint Template Sites

  SharePoint look book Get inspired Discover the modern experiences you can build with SharePoint in Microsoft 365 https://lookbook.microsof...