2010-03-03 30 views
0

我有兩個listItems中的一個單選按鈕列表包括:ASP.NET - 如何將標籤添加到RadioButtonList ListItem?

<asp:RadioButtonList runat="server" ID="optRollover" OnSelectedIndexChanged="RolloverOptionSelected" AutoPostBack="true"> 
        <asp:ListItem Value="0">100% </asp:ListItem> 
        <asp:ListItem Value="1">Less than 100%</asp:ListItem> 
</asp:RadioButtonList><br />    

在第一個列表項,我需要有一個顯示從代碼中的一些文本的頁面背後的標籤。從邏輯上講,似乎對我來說,我將能夠做這樣的事情: 100%

顯然,這並不工作,因爲我得到了一個錯誤: 的「文本」屬性「ASP:的ListItem」不允許子對象。

任何人都可以想出解決這個約束的方法嗎?

+0

編輯:這是我的意思在上述第二段: 的 100%<標籤RUNAT = 「服務器」 ID = 「lblAmount」> EWizard 2010-03-03 14:36:19

+0

感謝您編輯Joel。新的StackOverflow ... – EWizard 2010-03-03 14:42:19

回答

0

我最終通過將相對定位放置在RadioButtonList下面來解決這個問題。 固定我了。 感謝您的觀看。