嘿,我有一個radiobuttonlist,並試圖設置一個基於會話變量選定的單選按鈕,但證明是不可能的。從Codebehind中選擇設置Radiobuttonlist
<asp:radiobuttonlist id="radio1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
<asp:listitem id="option1" runat="server" value="All"/>
<asp:listitem id="option2" runat="server" value="1" />
<asp:listitem id="option3" runat="server" value="2" />
</asp:radiobuttonlist>
I.e我怎樣才能在後面的代碼中選擇option2?
listitem沒有id屬性 – 2014-05-30 13:45:47