开发者

RadioButtonList SelectedItem always first one

开发者 https://www.devze.com 2023-01-11 00:59 出处:网络
I am using simple radiobuttonlist with four items, I have enabled viewstate and postback but whatever option I choose it always return first value.

I am using simple radiobuttonlist with four items, I have enabled viewstate and postback but whatever option I choose it always return first value.

Here is the code:

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


开发者_StackOverflow社区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"]);

and I have RadCalendar, on which SelectedDateChanged Event I populate the radlist


Vibralux thanks for reply!

I fixed it now, it was a mistake that my VALUE for list items which I was generating were not unique, so I just assigned unique values to Listitem and it started working fine.

Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消