1-quickpart Overview
Quickpart is a tool that helps SharePoint developers package common ASP. NET User Controls (. ascx) into Web components. With quickpart, developers can quickly create user controls, deploy them directly on the server, and place them on the SharePoint page in a WYSIWYG manner.
2-deployment of quickpart
Quickpart installer is a standard SharePoint solution package. When quickpart is installed, it is installed in the entire Sharepoint Server Farm. Then, developers can activate or disable quickpart in each website set. If the old version of quickpart already exists on the server, it is recommended that you uninstall the old version of quickpart before installing the new version.
If your environment is a Sharepoint Server farm that contains multiple physical servers, you only need to deploy quickpart on one of the SharePoint servers. Quickpart is automatically distributed to all physical servers in the server farm.
2.1-Deploy the quickpart solution package
Copy the quickpart installer to the Sharepoint Server.
Double-click the "installsolution. Bat" batch file to start the installation process of the quickpart solution package. After the quickpart solution package is installed, the following information is displayed in the command prompt.
Select SharePoint 3.0 management center from the management center in the Windows Start Menu to open the SharePoint Management Center website.
On the Management Center website page, click the "operations" tab at the top of the page.
Click the solution management link in the global configuration area to open the solution Management page.
Click "quickpart. WSP" to go to the solution properties page.
Click "Deployment Solution" to open the Deployment Solution page. Select the web application to deploy quick part from the "select Web application to deploy this solution" drop-down list. Click "OK ".
On the Solution Management page, you can see that quickpart has been deployed to the specified web application. To deploy quickpart to multiple web applications, click
"Quickpart. WSP", click "deploy solution", and select the next web application to be deployed.
2.2-activate quickpart on the website
If you want to use quickpart in a SharePoint website, you must first activate quickpart in the website set where the website is located. Quickpart is activated or disabled based on the website set level.
In the SharePoint website where you want to activate quickpart, click the "website operations" menu, and click this menu to open website settings.
If you are in a Sharepoint website with the release function enabled, the "website operations" menu is shown in.
If you are in a common SharePoint website (the publishing function is not enabled), the "website operations" menu is shown in.
If you open the website settings page on a subwebsite, there is only one "go to primary website Settings" link in the "website set management" area. Click this link to go to the website settings page of the primary website.
Click the "website set function" link in the "website set management" area to open the website set management page.
On the website set management page, find the "quickpart" function and click "Activate" on the right.
3-use quickpart
3.1-copy the user control to the Sharepoint Server
After you create a user control, you need to copy the two types of files of each user control to different locations on the Sharepoint Server. One type of file is the ascx file of the user control, and the other type of file is the background generation of the User Control
Code generated after compilation 3.1.1-copy the ascx File
You can copy the ascx file (. ascx) of the user control to one of the two locations on the server as needed.
If you only need to use this user control in a web application, you can choose to copy the ascx file to the "wpresources" subdirectory of the disk folder corresponding to the Web application. You can create a subfolder in the "wpresources" folder and copy the ascx file to it. . Dll Assembly file. If your server farm contains multiple Web Front-end servers, you must ensure that these files are copied to each Web Front-End Server.
If you want to use a user control in all web applications, you can copy the ascx file to the "C: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ template \ controltemplates "(assuming the Windows system partition is C :) File
Folder. The user control ascx file built in SharePoint already exists in this folder. Therefore, we recommend that you create a subfolder in this folder to store your own ascx files.
3.1.2-copy the Assembly File
You can select the background code generated after the user control is compiled. the DLL Assembly file is copied to the Global Assembly Cache (GAC) of the Sharepoint Server, or to the "bin" folder of each web application.
Copying an assembly file to GAC is the easiest and convenient method. By default, assembly files can be trusted by Sharepoint.
If only one web application needs to use a user control, and you do not want to copy the Assembly file to GAC, you can copy the Assembly file to the "bin" subfolder in the disk folder corresponding to the Web application.
Copying an assembly file to the "bin" folder may cause a Sharepoint trust problem. If Code such as accessing the SharePoint object model and accessing the database exists in the Assembly file, Sharepoint may not trust your code. At this time, you can copy the Assembly file to GAC to make the Assembly file trusted by Sharepoint. Alternatively, you can manually modify the Web. config file in the Web application root directory to improve the default trust level of Sharepoint to solve this problem.
In the Web. config file, locate the "<trust>" node and change its "level" attribute value from the default "wss_minimal" to "full.
3.2-use quickpart on the page
Click "Edit webpage" in the "website operations" menu to bring the page to the editing status.
In the Web parts area where the control is to be placed, click "add Web parts" to open the Web parts selection window.
In the Web Part selection window, select quickpart (if you do not need to use the webpart connection function, quickpart (provider) and quickpart (consumer) are the same) and click "add. Now, quickpart is added to the page.
Click "edit" on the right of the quickpart title bar and select "modify shared Web parts" from the displayed drop-down menu ".
In the open toolbar, select the control you want to place on the page from the "User Control List.
Quickpart v1.3 download: http://files.cnblogs.com/lygx/QuickPart1.03.zip
"This article is the result of my work. If you have reprinted it, please indicate the source! Thank you for your cooperation ."