Creating a SharePoint Web Part Step by Step

This is the first time I develop for SharePoint, something that I wanted for a while, yet never got a project to do so. I have been a SharePoint user for many years, normally because all companies I have worked they use it as their document repository, “link provider”.

There are a few steps that are difficult to remember in order to create get a developed webpart installed and running, so I created a list for me to follow, best place to add it is my blog.

I would recommend the book “Inside Windows SharePoint Services 3.0” I found it very useful as well as very well written, Daniel Larson is a great technical writer.

 

A new book from this him is coming up in November 24thDeveloping Service-Oriented AJAX Applications on the Microsoft Platform” I can share with you that I read it, many times, and now is my favorite book of 2008.

Going back to SharePoint, below the simple steps to develop a webpart for SharePoint 2007.

Step by Step

  1. Create a new project class library, inherit the controls from System.Web.UI.WebControls.WebPart
  2. Each control you create needs to overrride the method Render: protected override void Render(HtmlTextWriter writer)
  3. Create a snk file and compile the dll.
  4. Install the dll into the computers GAC by dragging it to c:\windows\assembly
  5. On the Sharepoint web.config add a new SafeControl tag
  6. Then on Sharepoint as administrator go to Galleries and add a new webpart.

Now any user will be able to use the webpart.

Related posts

Walkthough from MSDN

Gu's release

Tam Tam Weblog tutorial

Cheers

Al

Published Thursday, October 30, 2008 10:51 PM by albertpascual
Filed under: , , , , ,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required)