WebControl - CollectionEditor Problem. Changing id property of new added collection item causes not

Discussion in 'ASP .Net Web Controls' started by Sergio, May 29, 2006.

  1. Sergio

    Sergio Guest

    Simple webcontrol with property Buttons of type List<WebControl>.
    When in design time i add new item into collection new added item gets
    default id("TextBox1").Changing it causes not adding this item to List
    ! Why???
    After adding item with default id and reopening collection editor is
    possible change id property.

    Any help ,please!

    here sample code:

    public class testControl : System.Web.UI.WebControls.WebControl
    {
    public testControl()
    {


    }
    private List<WebControl> m_Buttons;
    [
    PersistenceMode(PersistenceMode.InnerProperty),

    DesignerSerializationVisibility(DesignerSerializationVisibility.Content)

    ]
    public List<WebControl> Buttons
    {
    get
    {
    if (m_Buttons == null)
    m_Buttons = new List<WebControl>();
    return m_Buttons;
    }

    }

    }
    Sergio, May 29, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Øyvind Isaksen
    Replies:
    1
    Views:
    949
    Øyvind Isaksen
    May 18, 2007
  2. Nathan Phelps

    CollectionEditor is always "Object Collection Editor"

    Nathan Phelps, May 4, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    186
    Nathan Phelps
    May 8, 2004
  3. Replies:
    1
    Views:
    276
    Tim Dot NoSpam
    May 19, 2006
  4. Ismail E

    To show the value set to a property in the CollectionEditor

    Ismail E, Jun 15, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    111
    Ismail E
    Jun 15, 2006
  5. Peter Morris [Air Software Ltd]

    WebControl with non-WebControl property

    Peter Morris [Air Software Ltd], Dec 7, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    127
    Peter Morris [Air Software Ltd]
    Dec 7, 2004
Loading...

Share This Page