SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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
thanks tarjeieo – Mehwish Jan 24 '12 at 8:52
up vote 6 down vote accepted

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="" >
  <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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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