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
2009-06-23 22:21:34
.dwp is some kind of common format. If I can get that open I'm sure reflector would reveal the secrets
Mike T
2009-06-23 22:29:19
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
2009-06-23 22:32:46
Right - most SharePoint DLLs are stored in the GAC.
Alex Angas
2009-06-24 10:27:49
You can find the Micosoft.SharePoint.dll assembly in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\
anchorpoint
2009-06-25 11:54:33
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
2009-06-24 14:56:29
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
2009-06-24 17:03:55