SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a List Definition for use on 2007, 2010 (Sandboxed), and 2010 (unrestricted) that will need custom new and edit forms; unfortunately the Sandbox specifically excludes custom application pages.

So far, the only possible solution I've found for this is Wictor's sandboxed web part page workaround. Are there any alternative methods? Additionally, is Wictor's method 2007-compatible?

share|improve this question
up vote 2 down vote accepted

The deployment and implementation included in Wictor's article is only suitable for 2010 due to how the solution package would be deployed and how the custom web part is referenced in the custom page. In 2010 sandboxed webparts are referenced using the SPUserCodeWebPart wrapper which does not exist in 2007. In 2007, you can reference the web part directly (don't forget to register the namespace and assembly though).

If you need to target 2007, 2010 (sandbox/user solution) and 2010 (farm solution) then I would suggest you develop 2 different solution packages: one for 2007 and one for 2010 (sandbox/user solution). To cover the farm solution requirement, you should be able to use the sandboxed solution - as far as I am aware, you can install a sandboxed solution in the same way you would a farm solution.

share|improve this answer
Thanks Steve. Looks like it'll have to be in separate versions like you say, possibly split into a general 2007/2010 version and a 2010 sandbox version. I don't suppose you've come across any alternatives to Wictor's solution? – Stuart Pegg Jun 27 '11 at 10:38
If you are looking at providing an across-the-board 2007/2010 solution then I don't know of any other way than splitting up the deployment and providing alternative solutions for each scenario. I know InfoPath can be used to extend the New and Edit forms, but that's only in 2010. I am assuming you need to write a code-behind for the New and Edit forms? If that's the case you need access to the server to deploy farm solutions for the required assemblies. If it's something you can provide using WebParts then you may be able to do something a little more generic. – Steve Jun 28 '11 at 8:49

Try this one:

Enterprise Bugs: Custom NewForm.aspx based on ContentType in SharePoint sandboxed solutions to put JavaScript inside

share|improve this answer
While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. – SPDoctor Mar 26 '12 at 15:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.