radiobuttonlist text property

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

How can I set the text property for each button in a radiobutton list? Is
there a property that I can set in code?
 
Hi Jim,

|| How can I set the text property for each button in a
|| radiobutton list? Is there a property that I can set in code?

I'm not sure if you're aware of it, but you've answered yourself in your question!!

RadioButton1.Text = "Me, me, me"

RadioButton2.Text = "No, it's me"

RadioButton3.Text = "No, I'm the one"

Or have I misunderstood?

Regards,
Fergus
 
Hi Jim,

Sorry about that, this is more of a WinForms than Web group so
RadiobuttonList wasn't in my vocabulary (until now) and I took "radiobutton
list" to be a list of... well anyway. :-)

RadiobuttonList is inherited from ListControl.
Both have a property Items which is a ListItemCollection
ListItems have the Text property that you're after.

Unless I'm mistaken again. ;-)

Regards,
Fergus
 
Hi Jim,
How can I set the text property for each button in a radiobutton list? Is
there a property that I can set in code?
I'm not sure if you're aware of it, but you've answered yourself in your
question!!
RadioButtonList1.Items(0).Text = "me me me"
RadioButtonList1.Items(1).Text = "No it is me"
RadioButtonList1.Items(2).Text = "No, I'm the one"
Regards
Cor
 
Hello,

Jim said:
Thanks, but I have a radiobuttonLIST not individual radiobuttons.

Untested: 'MyRadioButtonList.Items(1).Text = "Hello World!"'.

You may want to post to the ASP.NET Web Controls ng:

news://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.webcontrols
 
Back
Top