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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top