ASP.net: Radio Button Not Maintaining Selection After Postback, Inside DIV/Thickbox
- by jlrolin
I have a set of radio buttons inside a hidden DIV.
<div id="reports" style="display:none;">
<center>
<br />
<table cellpadding="4" cellspacing="0">
<tr>
<td class="label">
Report Type::
</td>
<td class="value">
<asp:RadioButton ID="rbReportTypeCust" runat="server" Text="By Customer" Enabled="True" Checked="True" GroupName="rbType" /> <asp:RadioButton
ID="rbReportTypeProg" runat="server" Text="By Program" Enabled="True" GroupName="rbType" />
</td>
</tr>
<tr>
<td class="label">
Customer:
</td>
<td class="value">
<asp:DropDownList ID="ddlCustomer" runat="server" />
</td>
</tr>
<tr>
<td class="label">
Program Group::
</td>
<td class="value">
<asp:DropDownList ID="ddlProgramGroups" runat="server" />
</td>
</tr>
</table>
<br />
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClientClick="doPostBack(this);" />
</center>
</div>
The DIV is displayed using Thickbox as a modal popup. The doPostback javascript function posts the button click back, and hits btnSubmit_Click where a report is then generated. If I see if a radio button is checked, it's always rbReportTypeCust.checked = True, never the rbReportTypeProg.checked = True even if I click it.
Any suggestions?