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

S

Sergio

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;
}

}

}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top