2010-10-04 86 views
0

我可以開發一個控制,讓我做這樣的事情:ASP.NET:自定義子標記

<MyRadioList> 
    <MyRadioButton/> 
    <MyRadioButtonWithInfoButton/> 
    <MyRadioButton/> 
    <MyRadioButtonWithBlueColor/> 
</MyRadioList> 

也就是說,我可以把我的電臺列表裏面我自己的控制標籤。

可以使用模板化的用戶控件來完成嗎?

回答

-1

通過擴展內置的RadioList控件來創建一個新的RadioList控件。 ListItem對象也一樣。這種情況你不需要模板。

+0

我無法擴展ListItem,因爲它是一個密封的類 – codymanix 2010-10-05 07:46:44

+1

在看到ListItem是一個密封類時,我確定你碰到了不密封且可擴展的ListItemControlBuilder。 – TheGeekYouNeed 2010-10-05 17:02:32