SharePoint difference between user control and Web Part
Or
SharePoint difference between Visual Web Part andWeb Part
Or
SharePoint difference between Visual Web Part andWeb Part
When you start developing a web part, please check below points and decide, whether you have to go for user control or normal web part.
User Control
User controls are based on Microsoft ASP.NET, and most developers are familiar with developing user controls. This improves productivity.
User controls can be used with ASP.NET -based solutions. If you decide later to convert a project containing a user control to an ASP.NET -based solution, you should be able to use the control without making any changes.
The Visual Web Developer designer provides support for designing the UI by using drag-and-drop operations that gives the control a consistent look-and-feel, which results in faster development.
User controls must be compiled before use, which adds to the time it takes to load the control.
User controls are based on Microsoft ASP.NET, and most developers are familiar with developing user controls. This improves productivity.
User controls can be used with ASP.NET -based solutions. If you decide later to convert a project containing a user control to an ASP.NET -based solution, you should be able to use the control without making any changes.
The Visual Web Developer designer provides support for designing the UI by using drag-and-drop operations that gives the control a consistent look-and-feel, which results in faster development.
User controls must be compiled before use, which adds to the time it takes to load the control.
Web Part
In general, developers are not familiar with creating child controls by writing the code from scratch.
Web Parts can be used in ASP.NET -based solutions only when the solution uses Web Parts pages.
The controls in Web Parts must be added by using code.
Web Parts are pre-compiled and ready for use as soon as you need them.
In general, developers are not familiar with creating child controls by writing the code from scratch.
Web Parts can be used in ASP.NET -based solutions only when the solution uses Web Parts pages.
The controls in Web Parts must be added by using code.
Web Parts are pre-compiled and ready for use as soon as you need them.
Note: Adding Web Part properties is cumbersome for Visual Web Parts as compared to traditional Web Parts. As you develop Web Parts, many times you will want to expose their properties so that users and administrators can supply the values for those properties
In SharePoint 2010, Visual Web Parts are similar to user controls.
SharePoint 2010 Visual Web Part is an ASCX web user control that is hosted inside a standard Web Part.