开发者

adding my own control to the toolbox

Does anyone know why I can't add a subclass that inherits a control from AjaxControlToolKit to the ToolKit? I explicitly implemented IComponent which I didn't really have to since the ICont开发者_如何学Crol in the parent implements IComponent already. I'll compile the code, and try to add the DLL but I get the "doesn't contain any controls" error. I know this is a very specific error so there wasn't much help elsewhere.

[System.ComponentModel.DesignerCategory("Component"),
ToolboxData("<{0}:TabPanelWithDataBinding runat=server></{0}:TabPanelWithDataBinding>")]
public class TabPanelWithDataBinding : TabPanel, IComponent, IDisposable
{
//all the meat stuff
}


Because your base class "TabPanel" has an attribute [ToolboxItem(false)]. Which does filter the control from the assembly. You can try adding this attribute to your control with true as argument.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜