Working with Web Parts in SharePoint : Page 3

Deploying the Web Part

Now, save and compile the solution. If there are no errors, compiling will create a Setup.exe file in the Setup folder of your application directory. Double-click on the Setup.exe file to install the Web Part you just created (see Figure 3).

Figure 3. Installing the Sample Web Part: When you double-click the Setup.exe file, the install wizard will begin installing your Web Part.

Follow the installation instructions to complete the install. You need to specify the deployment target(s) for the Web Part as shown in Figure 4.


Figure 4. Specifying the Deployment Targets:
Select the target sites to which you want to deploy your Web Part.

Figure 5. Running a System Check:
The install checks to ensure all the required base functionality is available on the target machine.

The install then performs a system check (see Figure 5) that (among other things) ensures that WSS 3.0 and its services are installed and available on the target machine.

When the "Sample Web Part" installation completes, you'll see the screen in Figure 6.


Figure 6. Successful Install:
If your Web Part installed successfully, you'll see this screen.

Activating the Sample Web Part

You're almost done. Even though the Sample Web Part has been successfully installed to your system, you must still "activate" the Web Part to make it visible. To do that, click on Site Settings → Site Collection Features. You should see the Sample Web Part in the list (see Figure 7). Click the Activate button next to the Web Part you want to activate.


Figure 7. Activating Web Parts:
Click the Activate button to activate an installed Web Part

The Sample Web Part in Action

To see how the custom Web Part looks in SharePoint, switch to the Web Part Gallery and click on the Web Part you just activated. Figure 8 shows the new Sample Web Part in preview mode.


Figure 8. The Sample Web Part in Action:
Here's how the newly installed Web Part appears at run time.

That's it. You've seen a complete example of creating and deploying a custom Web Part using Visual Studio 2008 and SmartTemplates. With these tools at hand, you should be able to make SharePoint sites that are uniquely suited to your business's needs.

123
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Networking Solutions

Partners

More Networking