But here i'll go directly to the point which is "Start with environment setup, some concepts, developing simple webpart does something useful and walk through some enhancements to get robust one".
So with this series whatever your proficiency level you will find your start-point for doing this stuff.
Sorry for long intro. But i see it is nice to explain the strategy i'll follow at any issue i'll blog.
let's have some fun.....
Tools i use:
- VS.NET 2008.
- SharePoint Object Model(APIs-Application programming interface- for programmers).
- Open VS.NET 2008, from menu File --> New -->Projects.
- From left pane"Project types" select Visual C#--> Windows.
- At right pane"Templates" select Class Library.
- At text boxes down type your project "webpart" name "FirstWebPart".
- Let Visual Studio create the necessary project components for you.
- From Solution Explorer rename Class1.cs to FirstWebPart.cs.
- NOTE: At code editor, text after namespace and class are changed automatically(save seconds to rename it manually-thanks Microsoft).
- It's time to add some "DLLs" to help us to do our job.
- From Solution Explorer, right click on References --> Add Reference.
- Dialog Add Reference will appear and from .NET tab select tow references(System.Security - System.Web).
- To finish this step we missed only one important reference..Guess what? YES, it's SharePoint reference
- To get SharePoint DLL to be referenced at your project it depends on where you develop your webpart now, is it on machine with MOSS 2007 installed? or your own winXP machine(sharepoint not installed locally).
- CASE 1 "Machine with MOSS 2007 installed": Dialog Add Reference go to Browse tab and go to this URL(assuming your moss installed on c: drive)
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI
- CASE 2 "Local winXP machine": Ask your system administrator to locate this DLL on MOSS 2007 server and send it for you from mentioned ISAPI hive and save it at your local machine and locate it using previous step.
- At Solution Explorer the References node will look like the image below.
- Add directives to get access to different class inside references added earlier as Step1 shown in image below.
- Let your class inherits from WebPart class "That's why we add SharePoint reference-POINTS 12, 13 and 14"as Step2 shown in image below..
- After all these steps we have readymade environment for our development.
Now we have space to start our development.
Wait me next article and it will be soon...