using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;namespace ControlExpand
{
    public class Class3 : Panel
    {
        public Class3()
        {
        }
    }
}拖到界面后不显示

解决方案 »

  1.   

    准备写一个容器控件
    类似于dialog的现在想实现的功能就是可以把控件拖进Class3这个控件里
      

  2.   

    似乎是和
    PanelContainerDesigner
    有关
      

  3.   

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Web.UI.WebControls;
    using System.Web.UI;
    using System.Web;
    using System.Security.Permissions;
    using System.ComponentModel;namespace ControlExpand
    {
        [Designer("ControlExpand.ClassDesigner")]
        public class test : WebControl
        {
            public test()
            {
            }
        }
    }using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Web.UI.Design;namespace ControlExpand
    {
        public class ClassDesigner : ContainerControlDesigner
        {
            public override string GetDesignTimeHtml()
            {
                return "<div></div>";// base.GetDesignTimeHtml();
            }
        }
    }