Using RadioButtonList Class object.

  • Thread starter Thread starter Vinayaka
  • Start date Start date
V

Vinayaka

When we can use this control? I am not understanding its importance. Any
suggestions.
Vin
 
You can use the RadioButtonList anywhere you would use more than one radiobutton, which will be the case almost all the time. It's benefit is that you are able to reference the selected button by refering to it by the selectedValue, selectedItem, or selectedIndex property, similar to the listbox or the dropdownlist controls.
You can also add items to it programmatically on the server-side , by creating ListItem objects, or you can add them through the properties window if you are using Visual Studio.NET.
Another great feature of this control is that you are able to bind the items directly from a datatable or dataset, which is great if you have a variable number of ListItems depending on some condition.

hope this helps,
John
 
What I understood is "It avoids writing extra code"
Thanks for the info.
Vin

John Sivilla said:
You can use the RadioButtonList anywhere you would use more than one
radiobutton, which will be the case almost all the time. It's benefit is
that you are able to reference the selected button by refering to it by the
selectedValue, selectedItem, or selectedIndex property, similar to the
listbox or the dropdownlist controls.
You can also add items to it programmatically on the server-side , by
creating ListItem objects, or you can add them through the properties window
if you are using Visual Studio.NET.
Another great feature of this control is that you are able to bind the
items directly from a datatable or dataset, which is great if you have a
variable number of ListItems depending on some condition.
 

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

Back
Top