IntroductionHello, spent more than 1 year, Sharepoint 2010 is to come into force, many presentations from Microsoft "Sharepoint Road to 2010 ', but before you start doing articles on Sharepoint 2010, I recommend you take it easy, the product will still take some time to get to 100% until we are learning and it will soon launch a series of articles related to Sharepoint 2010, while it can revise a little basis exists for Sharepoint. In this article I demonstrate how we can use the Configuration files "Elements.xml" to add pages with webparts for the Sharepoint sites without having to make a line of code. :) Setting WebPart to importBefore creating our solution can begin to set our parameters and the WebPart which is going to receive.When configured, we can accomplish the export of our webpart through the option "Export"Menu of the Webpart. After you export the webpart to the format "*. dwp" or "*. webpart" we can open the file in Notepad format, where we can visualize the structure of our Webpart and parameters that it receives. Configure Visual Studio SolutionFeature configuration file with file support "elements.xml"to the Page Setup and Webpart. Elements.xml file where is defined in the configuration page to be imported into the SharePoint site and between properties of the page to add it to Webpart. Title to "AllUsersWebPart"serving to define the structure and Webpart zone to be added. WebPartZoneID: WebPart zone of your page where you will add the Webpart; WebPartOrder: The order of entry of the WebPart; <! [CDATA ["Structure Webpart" we can copy the contents of the exported file of *. webpart, DWP * Feature ActivationAfter installing the WSP solution in Sharepoint Farm and enable the solution in the SharePoint site, activating the Feature 'Add Webpart to page "to copy a page and add the Webpart previously configured. The "ReportGeral"was copied to the site and added the Sharepoint Webpart with the settings previously defined. ConclusionDone, we can configure our webparts and previously held the Deploy a SharePoint site included pages with webpart, without making a line of code. |