ASP.NET: Render RadioButtonList or CheckBoxList as Unordered List

If you’re using ASP.NET WebForms with the built-in controls you may notice that the RadioButtonList and CheckBoxList controls render out as a table by default. This is a real pain to style with CSS.

They key is the attribute RepeatLayout. It has 4 options:

  1. Flow
  2. OrderedList
  3. Table
  4. UnorderedList

That should be fairly straight-forward. Here’s an example:

Creating your first programming language is easier than you think.

Understanding how a programming language works is a surefire way to be a better developer. Read more.

Suggested Reading

written by Ryan Bosinger
Ryan is a web developer living and working in Banff Alberta. He also writes for giftsforpeoplewitheverything.com and freefoley.com.

One Response to “ASP.NET: Render RadioButtonList or CheckBoxList as Unordered List”

  1. darine says:

    Oooh, darn it. I thought you might have a solution suitable for me, but this is ASP.NET v4+ only; v3.5 didn’t have the list options, only Table and Flow :(

Leave a Reply