I want to create a web part using VS, I found 3 types:
- visual web part,
- visual web part farm solution only
which one should I start?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
The Visual Web Part can be used in sand box solutions and farm solutions but there are some restrictions to sand box solutions.
See https://msdn.microsoft.com/library/gg615454.aspx for which explains about the restrictions of sandbox solutions. Sometimes, this is the only option if your production environment has set these restrictions or if you need to deploy to SharePoint online.
The Visual Web Part (Farm Solution Only) can be used only in Farm solutions so it does not have these restrictions.
Please check this SharePoint stack exchange posts Visual Web Part vs Visual Web Part (Sandboxed)
First, let's define the Web parts
Web parts are server-side controls that run inside a web part page: they're the building blocks of pages that appear on a SharePoint site. for more details check Using Visual Web Parts vs. Traditional Web Parts in SharePoint
In Visual Studio you can develop There types of Web Parts
The Code only web part
Visual Web part
Visual Web part (Farm solution only)
Based on your requirement you can select which one you should you use.