Al Pascual



Geo RSS
Geo Twitter Timeline

Blogs I read

<January 2009>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

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

Posted from http://weblogs.asp.net/albertpascual

Comments

Dragan Panjkov said:

Al, instead of creating webparts manually, I would recommend using Visual Studio Extensions for WSS, release 1.2 (for VS2008) that streamlines SharePoint development by adding common templates for webpart, list, site... into VS. You can find more info about Sharepoint development on Paul Andrew's blog (http://blogs.msdn.com/pandrew) and on www.mssharepointdeveloper.com
# November 1, 2008 1:33 PM

~ YESChandana ~ said:

My favorite links from the 1th week of November 2008

# November 9, 2008 9:32 AM