如何显示在设计时web用户控件的控件?(how to show the controls for w

2019-10-16 15:26发布

这是我在这几年日子过研究,但我仍然不能显示在设计时控件...饲养它的节目类型“System.Web.UI.UserControl不具有公共属性的名称。控制没有显示,而我有一个内属性

实施例的.aspx代码:

<XF:XFButton ID="XFButton1" runat="server" >
    <Button1 ClientSideEvents-Click = "function(s,e){ApplyJavascript();}"></Button1>
 </XF:XFButton>

后面的.ascx代码例如:

 namespace XESControlsTestApp.WebControl
    {
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [ParseChildren(true)]
        [Browsable(true)]

        public class ContentContainer : Control, INamingContainer {

            private ITemplate _content;
            public ITemplate ContentTemplate
            {
                get { return this._content; }
                set { this._content = value; }
            }

            protected override void OnInit(EventArgs e)
            {
                base.OnInit(e);

                if (this._content != null)
                {
                    ContentContainer container = new ContentContainer();
                    this._content.InstantiateIn(container);
                    this._content.InstantiateIn(this);
                }
            }
        }
文章来源: how to show the controls for web user control in design time?