0

In vS2012 I can see Visual Web Part, Visual Web Part (farm only) and webpart.

What is difference between these?

What governs the choice of one of these?

1

webpart is a simple class.

Visual Web Part is a partial class which has markup. This markup is compiled into the assembly.

Visual Web Part (farm only) is a class which has reference to the user control. This control is deployed to the SharePoint root.

  • What governs the choice of one of these? – variable Jul 17 '14 at 12:57
  • @variable, if you develop farm solution the best choice is a Visual Web Part (farm only), it easy to redeploy after changes (for example, you can use CKSDev tool for the quick deployement), but if you develop sandbox solution you have to use webpart or Visual Web Part, because you do not have access to SharePoint root in this case. Visual Web Part is a next generation of the webpart. One main improvement that was made - the markup file was added. This file is compiled to the assembly. – Alexander Jul 17 '14 at 13:04
  • Which of them have design view? Thats another advantage right? – variable Jul 17 '14 at 13:05
  • @variable, design view - "Visual Web Part" (compiled in assembly) and "Visual Web Part farm only" (has user control which is deployed to the SharePoint root) – Alexander Jul 17 '14 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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