Clicky


Web Parts in SharePoint 2010

Web Parts run within the environment of Windows SharePoint Services or SharePoint Foundation. If Web Parts were user controls, deploying a new Web Part or upgrading one would require recompiling and reinstalling the program code for every SharePoint site that uses the Web Part. That’s why Web Parts aren’t user controls. In practice, laying out page elements with no WYSIWYG editor and writing program code that emits HTML aren’t the grueling tasks you might expect. The reason is that the output from most Web Parts is fairly simple. Many page elements such as the top navigation bar, the page banner, any toolbars, and any link area are part of the Web Part Page or of other Web Parts. Any Web Parts you create only display their specific data and inherit styles from the site’s theme.

How to Deploy a Custom Web Part?

To deploy or upgrade a Web Part, you must first compile it in Visual Studio. Then, you must copy the resulting assembly (that is, the resulting .dll file) into one of two locations:

  • The SharePoint server’s Global Assembly Cache (GAC): This makes the Web Part available to all virtual servers on the same computer, with maximum privileges. However, the assembly must have a strong name. (You must have compiled it with a key pair file.)

  • The bin folder of one or more virtual servers: This makes the Web Part available only on those virtual servers where you install it. Assemblies you install this way don’t need strong names, but strongly naming your assemblies is always a good idea

After you install a Web Part to either the global assembly cache or a virtual server’s bin folder, you can usually install new versions simply by dragging the .dll file into the same folder as its predecessor. However, this won’t work if you’ve changed the file’s name, version number, or strong key signature. Unless you manually installed a .dwp file in the virtual server’s wpcatalog folder, New Web Parts don’t appear automatically in the Web Part gallery of any site collection. To make them appear, a site collection administrator will need to add them.

Take advantage of web parts and other useful features of Hosted SharePoint Server 2013, SharePoint 2010 hosting, SharePoint Foundation hosting or SharePoint Server 2010 – with shared or dedicated hosting by Apps4Rent. Also see feature by feature comparison of SharePoint Foundation vs Server 2010. We offer free sharepoint with our hosted exchange plans. Microsoft Office SharePoint Server 2007 orĀ  MOSS 2007 is also available.

.

Comments are closed.

Submit Your Requirement