C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




SharePoint(WebPart & ClassLibrary)


Posted Date: 21 Jul 2008      Total Responses: 2

Posted By: Prabhakar dwivedi       Member Level: Bronze     Points: 1


Hi all
Can anyone tell me that can i use class library(C#) Project instead of web part projects in wss3.0,if yes then send me the method how to deploy this class library in to share point, send me some link or ur suggestion.

Thanks a lot




Responses

Author: shanmukha kumari    21 Jul 2008Member Level: GoldRating:     Points: 2
Please go through the below link to create webparts

http://www.codeguru.com/csharp/.net/net_asp/webforms/article.php/c12293/


Author: Jeyaprakash    06 Aug 2008Member Level: SilverRating:     Points: 6
Hi,

Steps 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

Cheers,
Jeyaprakash



Post Reply
You must Sign In to post a response.
Next : shrepoint administrator configaration
Previous : sharepoint,biztalk server
Return to Discussion Forum
Post New Message
Category: Sharepoint

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

silicone halloween mask

Contact Us    Privacy Policy    Terms Of Use