简体   繁体   中英

Refresh RadioButtonList in asp.net

I got this code for my RadioButtonList:

<div style="margin-top:5px"><asp:RadioButtonList ID="RadioButtonList6" RepeatColumns = "2" RepeatDirection="Vertical" RepeatLayout="Table"  runat="server">
    <asp:ListItem ValidationGroup="Curriculum" style="margin-right:12px; margin-top:-10px" >Si</asp:ListItem>
    <asp:ListItem ValidationGroup="Curriculum" >No</asp:ListItem></asp:RadioButtonList></div>
    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" 
    ControlToValidate="RadioButtonList6" Text="Elige una opción" 
    ValidationGroup="Curriculum">
    </asp:RequiredFieldValidator>

It works just fine, problem is, when go to another page, if i click back, Radio Buttons keep selected, i need them to step back or 'refresh' when i go back to the form, just to be clear, my form is a 9 pages one, so when user clicks finished it goes to another page, but if user wants to go back, it appears to be still selected.

How can i solve this?

I hope i've explained myself, thanks in advance!

您可以使用RadioButtonList.SelectedIndex = -1列出单选按钮列表的属性。使用此链接http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.radiobuttonlist.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM