Nested RadioButtonLists

L

Leszek

Hello,

Is it possible to create "nested radio button lists" using VS.NET. I mean to
create something like that (the following code does not work):

<asp:RadioButtonList id="RadioButtonList1" runat="server">
<asp:ListItem Value="A">AAA</asp:ListItem>
<asp:ListItem Value="B">BBB</asp:ListItem>
<asp:ListItem Value="C">CCC</asp:ListItem>
<asp:RadioButtonList id="RadioButtonList2" runat="server">
<asp:ListItem Value="1">111</asp:ListItem>
<asp:ListItem Value="2">222</asp:ListItem>
</asp:RadioButtonList>
</asp:RadioButtonList>

Here the RadioButtonList2 list contains suboptions for the <asp:ListItem
Value="C">CCC</asp:ListItem> radio button. I need them to be displayed right
below the CCC radio button that's why I need to nest the lists.

Thanks,
Leszek Taratuta
 
J

Jacob Yang [MSFT]

Hi Leszek,

Based on my research and experience, I think that it is impossible to
create "nested radio button lists" using VS.NET.

If what you want is only "I need them to be displayed right below the CCC
radio button", a simple way is using the RadioButton directly. Please refer
to the following aspx page.

<%@ Page Language="vb"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:RadioButton id="RadioButton1" style="Z-INDEX: 101; LEFT: 192px;
POSITION: absolute; TOP: 24px"
runat="server" Height="32px" Width="144px" Text="AAA"
GroupName="Group1"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" style="Z-INDEX: 102; LEFT: 192px;
POSITION: absolute; TOP: 72px"
runat="server" Height="24px" Width="144px" Text="BBB"
GroupName="Group1"></asp:RadioButton>
<asp:RadioButton id="RadioButton5" style="Z-INDEX: 105; LEFT: 192px;
POSITION: absolute; TOP: 112px"
runat="server" Height="24px" Width="144px" Text="CCC"
GroupName="Group1"></asp:RadioButton>
<asp:RadioButton id="RadioButton3" style="Z-INDEX: 103; LEFT: 280px;
POSITION: absolute; TOP: 152px"
runat="server" Height="32px" Width="152px" Text="111"
GroupName="Group2"></asp:RadioButton>
<asp:RadioButton id="RadioButton4" style="Z-INDEX: 104; LEFT: 280px;
POSITION: absolute; TOP: 200px"
runat="server" Height="24px" Width="152px" Text="222"
GroupName="Group2"></asp:RadioButton>
</form>
</body>
</HTML>

Does it answer your question? If I have misunderstood your concern, please
let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
<MCSD>
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top