473,769 Members | 7,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested RadioButtonList s

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:RadioButto nList id="RadioButton List1" runat="server">
<asp:ListItem Value="A">AAA</asp:ListItem>
<asp:ListItem Value="B">BBB</asp:ListItem>
<asp:ListItem Value="C">CCC</asp:ListItem>
<asp:RadioButto nList id="RadioButton List2" runat="server">
<asp:ListItem Value="1">111</asp:ListItem>
<asp:ListItem Value="2">222</asp:ListItem>
</asp:RadioButton List>
</asp:RadioButton List>

Here the RadioButtonList 2 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
Nov 17 '05 #1
2 3663
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="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:RadioButto n id="RadioButton 1" style="Z-INDEX: 101; LEFT: 192px;
POSITION: absolute; TOP: 24px"
runat="server" Height="32px" Width="144px" Text="AAA"
GroupName="Grou p1"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 2" style="Z-INDEX: 102; LEFT: 192px;
POSITION: absolute; TOP: 72px"
runat="server" Height="24px" Width="144px" Text="BBB"
GroupName="Grou p1"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 5" style="Z-INDEX: 105; LEFT: 192px;
POSITION: absolute; TOP: 112px"
runat="server" Height="24px" Width="144px" Text="CCC"
GroupName="Grou p1"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 3" style="Z-INDEX: 103; LEFT: 280px;
POSITION: absolute; TOP: 152px"
runat="server" Height="32px" Width="152px" Text="111"
GroupName="Grou p2"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 4" style="Z-INDEX: 104; LEFT: 280px;
POSITION: absolute; TOP: 200px"
runat="server" Height="24px" Width="152px" Text="222"
GroupName="Grou p2"></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.

Nov 17 '05 #2
Thanks a lot!
This is what I needed.

Leszek Taratuta

"Jacob Yang [MSFT]" <ji***@online.m icrosoft.com> wrote in message
news:QY******** ******@cpmsftng xa06.phx.gbl...
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="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:RadioButto n id="RadioButton 1" style="Z-INDEX: 101; LEFT: 192px;
POSITION: absolute; TOP: 24px"
runat="server" Height="32px" Width="144px" Text="AAA"
GroupName="Grou p1"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 2" style="Z-INDEX: 102; LEFT: 192px;
POSITION: absolute; TOP: 72px"
runat="server" Height="24px" Width="144px" Text="BBB"
GroupName="Grou p1"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 5" style="Z-INDEX: 105; LEFT: 192px;
POSITION: absolute; TOP: 112px"
runat="server" Height="24px" Width="144px" Text="CCC"
GroupName="Grou p1"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 3" style="Z-INDEX: 103; LEFT: 280px;
POSITION: absolute; TOP: 152px"
runat="server" Height="32px" Width="152px" Text="111"
GroupName="Grou p2"></asp:RadioButton >
<asp:RadioButto n id="RadioButton 4" style="Z-INDEX: 104; LEFT: 280px;
POSITION: absolute; TOP: 200px"
runat="server" Height="24px" Width="152px" Text="222"
GroupName="Grou p2"></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.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2569
by: Andy Baker | last post by:
Hi there, I'm learning Python at the moment and trying to grok the thinking behind it's scoping and nesting rules. I was googling for nested functions and found this Guido quote: (http://www.python.org/search/hypermail/python-1993/0343.html) "This is because nested function definitions don't have access to the local variables of the surrounding block -- only to the globals of the
3
2407
by: Erik Bongers | last post by:
Hi, Nested classes only seem to be able to access static members of the surrounding class : class SurroundingClass { public: class InnerClass { public:
6
559
by: B0nj | last post by:
I've got a class in which I want to implement a property that operates like an indexer, for the various colors associated with the class. For instance, I want to be able to do 'set' operations like MyClass.MyColors = Color.Green or, a 'get', such as Color forecolor = MyClass.MyColors; I want to use an indexer so I can take parameters, such as the color type (e.g. "Foreground", "Background" etc.). With a single member function I couldn't...
8
16919
by: Robert W. | last post by:
I've almost completed building a Model-View-Controller but have run into a snag. When an event is fired on a form control I want to automatically updated the "connnected" property in the Model. This works fine if all of the properties are at the top (root level) of the model but I'd like to keep them in nested classes to organize them better. So, for example, part of my data model looks like this (simplified) : public class MainClass
2
1146
by: sramruttun | last post by:
hi I have 2 radiobuttonlists in my form both having more or less the same listitems: At Design time, RDLGroup1 (1st radiobuttonlist) has the foll. items: A1 A2 A3 A4 A5 (A1 is selected) RDLGroup2 (2nd radiobuttonlist) has the foll. items: A2 A3 A4 A5 (None is selected)
1
2131
by: Tomas Sieger | last post by:
Hi all, I'm in doubt with the following code: class Base { public: class Nested {}; }; class Derived:public Base { public: class Nested {
77
5248
by: Peter Olcott | last post by:
http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html The above link shows that C# is 450% slower on something as simple as a nested loop. Is this because .NET is inherently slower or does the C# compiler merely produce code that is not as well optimized as the C++ compiler?
1
1870
by: loga123 | last post by:
I have an aspx page where I am creating "radiobuttonlists" dynamically based on the result from a SQL query. "ID" property of these controls is set dynamically. Then...i have a "submit" button on my page which when clicked takes me to another page. I want to capture the user selections on the radiobuttonlists in my previous page. code looks like this.
6
7269
by: Svein Erik | last post by:
C# asp.net 2.0. I'm creating an online survey. I'm making a string array that's holding the variables of the answers made in the radiobuttonlists that i create manually. I need to make a method that loops through all the radiobuttonlists and puts the selected answers in the string array that i've created. I guess this is relatively easy, but I haven't figured it out..here's the code that I have for now: protected void...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.