Difference between Visual Webpart and traditional webpart
1. Visual Web Parts have slightly larger memory footprints than code-only Web Parts.
2. Visual Web Parts contain more parts (Web Part, user control) than traditional Web Parts. Thus, loading a Visual Web Part takes longer than a traditional Web Part, resulting in poorer performance.
3. You can extend the traditional Web Part by inheriting from the WebPart class. You can then reuse the base Web Part functionality and extend it as desired. Visual Web Parts cannot be extended
4. Visual Web Parts can be deployed only as farm solutions because they deploy the user controls to the SharePoint root folder. Traditional Web Parts can be deployed as sandboxed solutions.
5. Visual Web Parts are similar to user controls in that you can simply drag and drop items from the Toolbox onto your custom controls to create a Web Part UI. You also get the code-behind file where you implement the UI logic. Technically, the SharePoint 2010 Visual Web Part is an ASCX web user control that is hosted inside a standard Web Part.
6. When you create a new Visual Web Part, (for example, SimpleVisualWebPart).
2. Visual Web Parts contain more parts (Web Part, user control) than traditional Web Parts. Thus, loading a Visual Web Part takes longer than a traditional Web Part, resulting in poorer performance.
3. You can extend the traditional Web Part by inheriting from the WebPart class. You can then reuse the base Web Part functionality and extend it as desired. Visual Web Parts cannot be extended
4. Visual Web Parts can be deployed only as farm solutions because they deploy the user controls to the SharePoint root folder. Traditional Web Parts can be deployed as sandboxed solutions.
5. Visual Web Parts are similar to user controls in that you can simply drag and drop items from the Toolbox onto your custom controls to create a Web Part UI. You also get the code-behind file where you implement the UI logic. Technically, the SharePoint 2010 Visual Web Part is an ASCX web user control that is hosted inside a standard Web Part.
6. When you create a new Visual Web Part, (for example, SimpleVisualWebPart).
Comments
Post a Comment