Description:
This article contains base information on how a SharePoint page's functionality can be extended by using a DevExpress web control.
Answer:
Typically, integration of an external web ASP.NET control into a SharePoint application's page requires that you perform the following steps: deploy the control's required assemblies (by GACing them and creating corresponding SafeControl entries), and add the control declaratively to the page (by using @Register directives and inserting the control's markup).
To practice this using a web DevExpress control, you should first identify the assemblies and namespaces that implement the control's functionality. This information can be found within the following help topics, respectively:
Deployment – General Information
ASPxperience Suite for ASP.NET 2.0 Overview
In this article, we demonstrated how to display the ASPxRoundPanel control within a SharePoint page. Note that we utilized version 2008 vol2 for demonstrative purposes only - you should register the assembly versions that you purchased.
1. Deployment
In order to use the ASPxRoundPanel's functionality, you should deploy two assemblies (DevExpress.Web.v8.2.dll and DevExpress.Data.v8.2.dll) and refer to two namespaces (DevExpress.Web.ASPxRoundPanel and the DevExpress.Web.ASPxPanel). Note that the version number of your purchased product might differ from the number used in this article.
- Register assemblies in GAC.
Register the required assembly files in the global assembly cache (GAC) of the server machine that hosts your SharePoint application. This makes web controls exposed by the assemblies available to all web applications of the host server.
See the How to: Install an Assembly into the Global Assembly Cache MSDN topic for more information.
- Register a HttpHandler Module.
Registering HttpHandler Module makes its features available for the DevExpress controls.
See the How to: Manually Register a HttpHandler Module help topic for more information.
- Create SafeControl entries. For each referenced assembly and each required namespace, add a SafeControl entry to your SharePoint application's Web.Config file. The following three entries should be created for the ASPxRoundPanel control.
XML<SafeControl Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1" Namespace="DevExpress.Web.ASPxRoundPanel" TypeName="*" Safe="True" />
<SafeControl Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1" Namespace="DevExpress.Web.ASPxPanel" TypeName="*" Safe="True" />
<SafeControl Assembly="DevExpress.Data.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1" Namespace="DevExpress.Data" TypeName="*" Safe="True" />
2. Adding to a page
Create (or open/check out) a SharePoint page with the help of Microsoft Office Sharepoint Designer 2007.
- Insert @Register directives Add references to namespaces related to the ASPxRoundPanel control's functionality by inserting the following @Register directives into the page.
ASPx<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1" Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dxrp" %>
<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dxp" %>
<bold>
- Add the control's markup</bold> Declaratively add the markup that represents the ASPxRoundPanel control into the page (or drag a control from the Toolbox, if it's available).
ASPx<dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="200px">
</dxrp:ASPxRoundPanel>
Now you can modify the control's properties either declaratively or via the designer's Tag Properties window.
ASPx<dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="200px" HeaderText="My Header">
<PanelCollection>
<dxp:PanelContent runat="server">
My ASPxRoundPanel
</dxp:PanelContent>
</PanelCollection>
</dxrp:ASPxRoundPanel>
Please refer to the attached image to see how the ASPxRoundPanel is integrated into the SharePoint Designer's environment.
See Also:
Replacing a SharePoint master page's default Quick Launch menu with the ASPxNavBar
Adding the ASPxNavBar onto the SharePoint 2010 master page
Applying an AutoFormat to a DevExpress web control integrated into a SharePoint page
How to manually register a HttpHandler Module
One notice . In VS 20102 and Sharepoint 2013 the SafeControl section should have a look like:
<SafeControl Assembly="DevExpress.Web.v13.2, Version=13.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TypeName="*" IsSafe="true" />