In this article I demonstrate how to create a simple web part for SharePoint 2010 using
Visual studio 2010.

  1. Open Visual Studio 2010 -> File-> New Project

  2. You will get a screen as shown below
  3. From the below screen select Visual Web Part from SharePoint category
  4. Give proper name for your web part

    image1.gif
  5. Click OK
  6. Next you have to give the URL of the site where you want to debug or deploy your webpart

    image2.gif
  7. Click Finish
  8. You will get the below Screen
  9. Just click on the Design Mode
  10. You will get the Design mode similar to normal ASP.net application
  11. You can Drag and Drop any control in to your page I just put a SharePoint Calendar control

    image3.gif
  12. You done with the web part .Now we can deploy it and test it
  13. Just right Click on the solution and click Deploy

    image4.gif
  14. Now go to the site where you deployed.
  15. Just open the page in Edit Mode
  16. Then click on Add web part
  17. Just click on Custom, you can see your web part Add the webpart

    image5.gif
  18. You have deployed your web part and tested the same
  19. Now next part, how to make it as a Package very easy just right click on the solution
  20. It will make a web part package in the folder where we created this web part

    image6.gif
  21. It's very simple to work with Visual studio 2010 to develop a web part for SharePoint 2010.