-1
내 코드는 다음과 같습니다. 여기에 하나만 rdbtn5 또는 하나의 라디오 목록 item.But 중 하나를 선택해야하는 문제가 있습니다. 그러나 둘 다 선택할 수 있습니다. 제발 제안 해주세요.라디오 버튼 목록 및 라디오 버튼 asp.net
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70%" style="padding-left:10px; text-decoration-color:white">
<div class="content" style="display: inline-block !important;">
<asp:RadioButton ForeColor="White" ID="rdContribute" AutoPostBack="true" OnCheckedChanged="rdContribute_CheckedChanged" Text="abc"<br/> GroupName="RadioGroup1" runat="server" /><!--onchange="Monthly()" -->
<div style="display:block;margin-left:10px;" id="dvrdList">
<asp:RadioButtonList ID="rdlist" ForeColor="White" GroupName="Selected1" runat="server">
<asp:ListItem Text="Rs.100/month(Rs.1200/Year)" Value="100" name="abc" Selected="True"></asp:ListItem>
<asp:ListItem Text="R.250/month(Rs.3000/Year)" Value="250" name="abc"></asp:ListItem>
<asp:ListItem Text="Rs.500/month(Rs.6000/Year)" Value="500" name="abc"></asp:ListItem>
<asp:ListItem Text="Rs.1000/month(Rs.12000/Year)" Value="1000" name="abc"></asp:ListItem>
<asp:ListItem Text="Rs.5000/month(Rs.60000/Year)" Value="5000" name="abc"></asp:ListItem>
</asp:RadioButtonList>
<asp:RadioButton runat="server" ID="rdbtn5" name="abc" AutoPostBack="true" OnCheckedChanged="rdContribute_CheckedChanged" GroupName="Selected1"/><asp:TextBox ID="tbGreater" runat="server" onkeypress="return isNumberKey(event)" CausesValidation="true" Enabled="false"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" Type="Integer" MinimumValue="1000" MaximumValue="1000000" ControlToValidate="tbGreater" runat="server" ErrorMessage="Enter digits greater than 1000"></asp:RangeValidator>
</div>
<asp:RadioButton ForeColor="White" ID="rdNo" AutoPostBack="true" Text="I do not wish to make a contribution" OnCheckedChanged="rdNo_CheckedChanged" GroupName="RadioGroup1" runat="server" />
</div>
</td>
</tr>
<tr>
<td>
<asp:RadioButton ForeColor="White" ID="rdReminder" AutoPostBack="true" name="rdReminder" Visible="false" OnCheckedChanged="rdReminder_CheckedChanged" Text="def" GroupName="RadioGroup1" runat="server" />
</td>
</table>
다른 모든 RadioButtons를이 이벤트를 추가합니다. rdbtn5를 선택한 후 다른 Rdlist 항목을 클릭하면 같은 문제가 발생합니다. –
내 대답이 업데이트되었습니다. 상황에 맞게 작동하려면 약간 조정해야 할 수도 있습니다. – VDWWD
고마워 .. 일했다 :) –