C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

Webpart Deployment


Posted Date: 06 Aug 2008    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: JeyaprakashMember Level: Silver    
Rating: 1 out of 5Points: 15



This articles discusses on how to deploy WebParts. There are two ways to deploy a Webpart. Here, we try to enlist the steps involved.

Step 1: Move the Assembly (dll) in to GAC (C:\WINDOWS\assembly)

Step 2 : Add cab/setup project for the deployment


How to Create and Deploy Class Library Project Webpart

1. Create a Class Library project.

2. Add the following references


Microsoft.Sharepoint
System.Data
System.Web


3. Rename the Project as well as class files.

4. Use the following namespaces in the class file


using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


5. Inherit WebPart in the class file

6. Now right click on project file and select properties and select/create strong name.

7. Compile the application.

8. Now find the Assembly (dll) in the bin folder.

9. Move the assembly in to the GAC. GAC availbale in the C:\WINDOWS\assembly path.

10. Add the below code in the web.config for the particular webpage. This code should be placed in the SafeControls tag. Right click on the assembly in the GAC to copy PublicKeyToken number.


SafeControl Assembly="ClassLibrary_WP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=13638a1282740f9f" Namespace="ClassLibrary_WP" TypeName="*" Safe="True"


11. Use iisreset\ noforce to refresh the web page.

12. Open SPS site, click on site Actions -> Site Settings -> Click on Webparts -> Click New -> Select your webpart






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Webpart Deployment  .  Steps to Create and Deploy Class Library Project Webpart  .  How to Create and Deploy Class Library Project Webpart  .  Deploying WebPart  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Using site Map in Asp.net2.0
Previous Resource: Creating Master Page in Visual Studio 2005
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use