Thursday, January 6, 2011

Creating Simple WebPart using Visual Studio 2008 extensions for Windows SharePoint Services 3.0

Environment:
Moss2007, Visual Studio2008 and
Visual Studio 2008 extensions for Windows SharePoint Services 3.0 (Download here)

Steps:
1.Create a new project and click  Sharepoint and then select Web Part as  shown in Fig 1.

                                                                     Fig 1
2.Solution Explorer after previous step should look like as in Fig 2.
                                                                     Fig 2
Open the cs file and uncomment the label options under CreateChildControls as shown above.

3. Goto Project under Menubar and select webpart properties at the bottom.
4.Under Start With URL option under Debug option Type the address of your site as shown in Fig 3
Fig 3

5. Press F5, to Run the project.
6.Open the Sharepoint site and select site Settings under Site Actions on top right corner of sharepoint home 
   page.It will display page as shown in Fig 4.

Fig 4
   You can see your added web part in webpart gallery after clicking Web Parts option as shown in Fig4.

7.Goto home page and click Edit Page option under Site Actions. After this home page ill look as in Fig 5.
                                                             Fig 5
Click  Add Web Part based on location where you want to add it and you are DONE.





No comments:

Post a Comment