2010-08-12 56 views
1

我使用簡單的radiobuttonlist與四個項目,我已啓用viewstate和回發,但無論我選擇它的任何選項總是返回第一個值。RadioButtonList SelectedItem總是第一個

下面是代碼:

<asp:RadioButtonList runat="server" AutoPostBack="true" 
    EnableViewState="true" OnSelectedIndexChanged="Changed" ID="rbSlots"> 
</asp:RadioButtonList> 


ListItem item = new ListItem(starthour + " - " + stophour + ds.Tables[0].Rows[i]["LastName"].ToString(), ds.Tables[0].Rows[i]["xavid"] + "¤" + ds.Tables[0].Rows[i]["xuserid"]); 

,我有RadCalendar,其上SelectedDateChanged事件我填充radlist

+0

向我們展示你已經是很好的幫助! – Vibralux 2010-08-12 09:15:46

回答

2

Vibralux感謝的答覆!

我現在修好了,我產生的列表項目的VALUE不是唯一的,所以我給Listitem分配了唯一的值,它開始工作正常。

Regards

相關問題