Saturday, April 4, 2009

Create SharePoint WebPart using Visual Studio SharePoint Extension

  • Install Visual Studio SharePoint Extension.
  • Open Visual Studio and create New Project > Select SharePoint as Project Type > Select Web Part project template.
  • Then open Webpart1.cs file and add below things in render method.

protected override void Render(HtmlTextWriter writer)


writer.write("My First Web Part.");


  • Open Property Window of this project and Go TO Debug Tab and add your site URL to Start browsing with URL http://MyPC:100/MyFistSite/" (As per below Image)

  • Right Click on Project in Solution Explorer and Select Deploy.
  • After Successfully Deploy open your SharePoint site and Add Your First Web Part on your Web Part Page.

Very Easy to work with SharePoint Web Part.

No comments:

Post a Comment