2010-08-12 60 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

相关问题