how to show the controls for web user control in design time?
Asked Answered
S

0

1

this is what i had research in this few day, but i still cannot show the controls in design time... its keep show Type " System.Web.UI.UserControl does not have a public property name. The control is not showing while i have a inner property

Example .aspx code:

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

Example behind .ascx code:

 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);
                }
            }
        }
Social answered 25/4, 2012 at 3:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.