Creating SharePoint 2010 Visual WebParts - Part 1 - Farm Solutions

Written By: Hesham Saad -- 5/25/2011 -- join -- contribute -- (3467) comments -- printer friendly version

Rating: Rate --

Categories: Configurations, Programming and Customizations, SharePoint 2010, SharePoint Foundation 2010, Visual Studio, Web Parts

< Prev - 1 | 2 | 3 | 4 | 5 | - Next > | Become a paid author

2. Exploring and designing the created Visual Web Part:

  - Now after the project is created, the Solution Explorer contains the default Visual Web Part named "MSSharePointTipsVWP". It also has the presence of the Features and Package nodes. A feature organizes the application in a way that SharePoint Foundation understands. Features can be deployed to SharePoint Foundation at the site or web level. The package contains features and other assets used when you deploy solutions to SharePoint Foundation:


  - We can change the default Feature1 name by rename it to "MSSharePointTipsVWPFeature" by clicking on the F2 function key or right-click on it and select rename:


  - We can change the feature scope by double clicking on the "MSSharePointTipsVWPFeature" renamed default feature, and then choosing from the Scope choices. We select the Site scope feature:


 - Let's explore the Visual Web Part by opening the "Elements.xml" file under "MSSharePointTipsVWP":


  "Grouping" web parts is one of the best practices that we have to follow for better management and organization of web parts, setting the "Group" property in Elements.xml file of the web part to make sure the web parts come under a specific group (ex: Value="MSSharePointTips"). This will make it easier to find the web part from the SharePoint site. 

< Prev - 1 | 2 | 3 | 4 | 5 | - Next >

Learn more about SharePoint

Sponsor Information

Copyright (c) 2010-2017 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | contribute | feedback | about
Some names and products listed are the registered trademarks of their respective owners. |