Skip to content Skip to sidebar Skip to footer

C# Asp.net Radiobuttonlist Within Table: Border Also Creating Border Arount List Items

I have created a table with borders collapsed around the table and a small gray border on each . However the border is also surrounding each radio button items. The bor

Solution 1:

Use Flow RepeatLayout for RadioButtonList or create new css class for it : table.noBorder td { border: none; } and use this class for your radiobuttonlist

Solution 2:

Susan, From what I can tell, when asp radiobuttonlist method is used, by default it creates a table with each radio button as a separate td. The newly created table inherits the css class of the next table up the heirarchy. If you use the 'RepeatLayout="Flow"' attribute, it will convert them to spans using the cssclass you define in the radiobuttonlist definition. Hope that helps.

Oops, just looked at the date. This is a little old, but maybe helpful.

Solution 3:

add style="border: none;" as attribute to the td-element

Solution 4:

When Asp.Net is interpreted as HTML, by default, tags are placed around each radio button item. If you have set a style on the element in your table, it will also be inherited by the radio button elements. To turn the border off on styling off, use the following property on the radio button control: RepeatLayout="Flow".

The border property on the radio button control is a separate border.

Post a Comment for "C# Asp.net Radiobuttonlist Within Table: Border Also Creating Border Arount List Items"