Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Asp.net Custom Control with custom property

$
0
0

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:

publicclassBaccahRadioGroup:RadioButtonList,INamingContainer{privateListItemCollection englishList;/// this is my custom list[Bindable(true)][Localizable(true)][Category(category)]publicvirtualListItemCollectionEnglishList{
        get{if(englishList ==null){
                englishList =newListItemCollection();((IStateManager)englishList).TrackViewState();}return englishList;}protectedoverridevoidRender(HtmlTextWriter writer){base.Render(writer);}}}


Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>