Use Visual Studio to create a new Web Part Project

Source: Internet
Author: User

Using Visual Studio to create a new Web Part project Web Part is one of the most common objects you will create for SharePoint. It is the core base block for platform construction. 1. Open Visual Studio as an administrator and create a blank SharePoint project. Name WroxSPProject and click OK. Deploy as a solution, and click Finish. 2. Right-click and select Add new project Web Part, name it SimpleWebPart, and click Add. 3. Before proceeding, click Generate-deploy solution. At this point, you will find that VS has added many projects to the solution. For example, it adds feature1.feature. The new node SimpleWebPart is also added, which contains many files. Although you cannot see it, many configuration XML files are updated.
If you double-click the feature node, the Feature Designer is opened. It provides a graphical view of the feature that constitutes the current WSP package. And set the deployment level (such as the website or field ). You can add or remove feature from this view. Configure deployment options and edit XML. Because you only add one Web Part, only one feature is displayed.
1. Navigate to SimpleWebPart. webpart and double-click to enter the code view. Modify attributes.
2. Open SimpleWebPart. cs. Modify the code. 3. Deploy the solution. 4. Click View> output. The default generation and deployment steps are displayed. 5. Add the Web Part: Wrox Book Delivery on the Site Page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.