I am new to SharePoint 2010 development and just created a VisualWebPart in Visual Studio 2010 but it added the webpart as "VisualWebPart1".

How do I change the default name of it and make it "HelloWorld" or any name I would like to give?


  • Thank you but tell me one thing each time when I need to create a new VisualWebPart how to provide a custom name at that time which should create the VisualWebPart node with the name I provide while creating VWP. – Mehwish Jan 24 '12 at 8:06
  • You have to first create a Empty SharePoint Project, and the add a visual webpart. This way you can give them different names. – tarjeieo Jan 24 '12 at 8:46

To rename the Title that will be visible for the end user, open Elements.xml-file in the webpart-module. Locate the <File>-element and add <Property Name="Title" Value="My Display Title" />

The Elements could look like something like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
  <Module Name="ContentQueryCustomWebPart" List="113" Url="_catalogs/wp">
    <File Path="ContentQueryCustomWebPart\ContentQueryCustomWebPart.webpart" Url="ContentQueryCustomWebPart.webpart" Type="GhostableInLibrary">
      <Property Name="Group" Value="Content Rollup" />
      <Property Name="Title" Value="My Display Name" />

If you have to rename the webpart-element in Visual Studio, you are probably better off by deleting it and creating a new one.


Open your web part folder in VS2010 and find *.webpart file. In this file you should change Title property, for example

   <property name="Title" type="string">Navigation Web Part</property>
   <property name="Description" type="string"></property>

This title is displayed in web part list when you tries to add web part to the page.

If you would like to change name when you tries to provision web part to the page you should use @tarjeieo solution.

If you would like to change web part name that is deployed to the page, you can go to the web part settings and change Title property.


If you would just delete the web part and add new one with correct name?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.