I am trying to create custom RadioButtonGroup control and add custom ListItemCollection property to
this control, i already added this property but my problem that: I drag the control to my web page then open the inspector for this control and store
items in my custom list(3 items), when i run my page and access this list i found its count=0 i don't know why??
This is my code:
public class BaccahRadioGroup : RadioButtonList, INamingContainer
{
private ListItemCollection englishList; /// this is my custom list
[Bindable(true)]
[Localizable(true)]
[Category(category)]
public virtual ListItemCollection EnglishList {
get
{
if (englishList == null)
{
englishList = new ListItemCollection();
((IStateManager)englishList).TrackViewState();
}
return englishList;
}
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
}
}
}