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?
Thanks
|
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? Thanks |
|||||||
|
|
To rename the Title that will be visible for the end user, open Elements.xml-file in the webpart-module. Locate the The Elements could look like something like this:
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
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. |
|||
|
|