Note: This article was originally published in 2010. Some steps, commands, or software versions may have changed. Check the current .Net documentation for the latest information.
Prerequisites
Before you begin, make sure you have:
- Visual Studio or .NET CLI installed
- .NET Framework or .NET Core SDK
- Basic C# programming knowledge
After reading many posts I can say it is very hard to find information on how to get Custom Controls created by third parties working properly in SharePoint 2010 Application Pages (I guess a lot of people are not doing them yet). The solution actually turned out to be a bit simpler than one would expect after hours of trying everything possible. There are 3 things you can do to guarantee DevExpress’ controls work properly:
- Make sure the referenced libraries are available in the GAC
- Make sure you have added all the necessary entries in your web.config. This is the tricky part, SharePoint 2010 uses integrated authentication so you need to go to your “C:inetpubwwwrootwssVirtualDirectories80” folder and in that web.config find the modules section on the system.webserver (this is for integrated authentication, if you don’t have that you should use the system.web)
- Make sure you add the controls as safe controls in the web.config and ensure you have the required references in your aspx page.
How to add the Module to the web.config: <system.webServer>
Don’t forget your @Page directives:
Don’t forget your @Page directives:<%@ Register Assembly=“DevExpress.Web.ASPxGridView.v10.1, Version=10.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a” Namespace=“DevExpress.Web.ASPxGridView” TagPrefix=“dx” %><%@ Register Assembly=“DevExpress.Web.ASPxEditors.v10.1, Version=10.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a” Namespace=“DevExpress.Web.ASPxEditors” TagPrefix=“dx” %><%@ Import Namespace=“DevExpress.Web.ASPxEditors” %><%@ Import Namespace=“DevExpress.Web.ASPxGridView” %>
Summary
You’ve successfully learned make devexpress work on your sharepoint 2010 application page. If you run into any issues, double-check the prerequisites and ensure your .Net environment is properly configured.
Related Articles
- From where does ASP.Net tries to load Assembly files?
- How to: Hide a row in Telerik’s RadGrid
- How to: Telerik RadGrid loses it’s state of expanded and contracted groups whenever you databind
- Telerik - The base class includes the field {}, but its type {} (Telerik.Web.UI.RadGrid) is not compatible with the type of control (Telerik.Web.UI.RadGrid).