+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Unable to cast object of type 'ASP.usercontrols_custommodule_commandpanel_ascx' to type 'Telerik.IControlPanelCommand'.

Unable to cast object of type 'ASP.usercontrols_custommodule_commandpanel_ascx' to type 'Telerik.IControlPanelCommand'.

1 posts, 0 answered
  1. sarath
    sarath avatar
    24 posts
    Registered:
    24 Jan 2010
    24 Feb 2010
    Link to this post
    Hi,

    I am trying to implement a custom module. I am keeping the all code files in a seperate class library and the usercontrols in the root site. Please see the below.
    I am getting below exception when I try to do the below.
    CustomModule.cs:
    public override IControlPanelCommand[] CreateToolBoxControls(TemplateControl parent)
          {
            return new IControlPanelCommand[] { (IControlPanelCommand)parent.LoadControl("~/UserControls/CustomModule/CommandPanel.ascx") };
          }
    CommandPanel.ascx:
    <%@ Control Language="C#" AutoEventWireup="true" Inherits="CustomModuleLib.UserControls.Admin.CommandPanel" %>
     <h2>
        Custom Module</h2>

    I am getting the below exception:
    Unable to cast object of type 'ASP.usercontrols_custommodule_commandpanel_ascx' to type 'Telerik.IControlPanelCommand'.

    Thanks,
    Sarath
1 posts, 0 answered