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 Answer 1

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.

4
  • What governs the choice of one of these?
    – variable
    Commented Jul 17, 2014 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
    Commented Jul 17, 2014 at 13:04
  • Which of them have design view? Thats another advantage right?
    – variable
    Commented Jul 17, 2014 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
    Commented Jul 17, 2014 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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