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 24th “Developing 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
- Create a new project class library, inherit the controls from System.Web.UI.WebControls.WebPart
- Each control you create needs to overrride the method Render: protected override void Render(HtmlTextWriter writer)
- Create a snk file and compile the dll.
- Install the dll into the computers GAC by dragging it to c:\windows\assembly
- On the Sharepoint web.config add a new SafeControl tag
- 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
Posted from
http://weblogs.asp.net/albertpascual