1

这就是我这几天的研究,但我仍然无法在设计时显示控件......它保持显示类型“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);
                }
            }
        }
4

0 回答 0