C
Chan
I'd like to place some radio buttons across a row of different <td>
inside of a <tabl>, such as:
-----------------------------
| radio1 | radio2 | radio3 |
-----------------------------
All of them are sharing the same ID, say "rd".
However, I can not do it in the following:
<asp:radiobuttonlist id="rd" runat="server" autopostback="true">
<table>
<tr>
<td><asp:listitem>radio1</asp:lineitem></td>
<td><asp:listitem>radio2</asp:lineitem></td>
<td><asp:listitem>radio3</asp:lineitem></td>
</tr>
</table>
</asp:radiobuttonlist>
..Net complains:
System.Web.UI.WebControls.ListItemCollection must have items of type
'System.Web.UI.WebControls.ListItem'. 'table' is of type
'System.Web.UI.HtmlControls.HtmlTable'.
If <asp:radiobuttonlist> and its child can only be together as a
whole, means no other html tags mixed within, it's not convenience at
all.
I guess workaround would be:
- use <asp:radiobutton> for each individual w/ the same name.
- use plain HTML tags.
Thanks!
inside of a <tabl>, such as:
-----------------------------
| radio1 | radio2 | radio3 |
-----------------------------
All of them are sharing the same ID, say "rd".
However, I can not do it in the following:
<asp:radiobuttonlist id="rd" runat="server" autopostback="true">
<table>
<tr>
<td><asp:listitem>radio1</asp:lineitem></td>
<td><asp:listitem>radio2</asp:lineitem></td>
<td><asp:listitem>radio3</asp:lineitem></td>
</tr>
</table>
</asp:radiobuttonlist>
..Net complains:
System.Web.UI.WebControls.ListItemCollection must have items of type
'System.Web.UI.WebControls.ListItem'. 'table' is of type
'System.Web.UI.HtmlControls.HtmlTable'.
If <asp:radiobuttonlist> and its child can only be together as a
whole, means no other html tags mixed within, it's not convenience at
all.
I guess workaround would be:
- use <asp:radiobutton> for each individual w/ the same name.
- use plain HTML tags.
Thanks!