
Creating Visual Web Parts
One of the greatest enhancements in the 2010 platform for SharePoint development is the
notion of visual web parts. These are still the same web parts that you created in MOSS 2007;
however, now a project template provides mark-up abilities so that development does not need
to rely on creating and instantiating control objects from code alone.
Previously, one of the biggest complaints in building web parts was not seeing what you were
building until you thought you were nished and deployed the code. Now with Visual Studio
2010 and SharePoint 2010, development of web parts is easier and more reliable when starting
fresh. Essentially, Visual Studio provides the framework to create visual web parts without having
to manually hook up all the pieces.
In addition to Visual Studio 2010, you can also leverage SharePoint Designer 2010 to create
visual web parts based on an XSLT List View web part. This enables you to easily add web
parts to a page, view the results, and stylize the content before publishing the page to your
SharePoint site.
CREATING VISUAL WEB PARTS
You can facilitate the creation of a visual web part using Visual Studio 2010. This section
describes the steps and tasks necessary to create a visual web part from end to end.
Visual Web Part Project
The rst step to creating a new visual web part is to open Visual Studio 2010 and create a new
project ...