views:

114

answers:

2

I want to look into one of the out of the box MOSS 2007 webparts and examine the code. After that I want to replicate some of the functionality and add some of my own. Any techniques?

+1  A: 

Try .NET Reflector (free!) from http://www.red-gate.com/products/reflector/ . Depending on which web part it is, you can inherit and extend. If the web part is sealed, you could consume/adapt it, or plainly roll your own with inspiration from what source code .NET reflector generated for you. But it really depends on, what you want - a lot of web parts in MOSS can be configured in a lot of ways using plain XML configuration .webpart-files.

anchorpoint
.dwp is some kind of common format. If I can get that open I'm sure reflector would reveal the secrets
Mike T
My mistake. I have to find the actual assembly to get the code.. the .dwp one gets is only the XML reference to the .dll on the server.
Mike T
Right - most SharePoint DLLs are stored in the GAC.
Alex Angas
You can find the Micosoft.SharePoint.dll assembly in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\
anchorpoint
A: 

All SharePoint DLL's can be found in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI folder, use reflector to inspect the code. Some code may be obfuscated though...

Colin
thanks. More specifically for those looking at the controls wthin sharepoint, pay attention to the Microsoft.SharePoint.WebControls namespace in the Microsoft.SharePoint.dll assembly
Mike T