Asp: RadioButtonList adds RadioButton to a new line

The problem is this: I have a horizontal asp: RadioButtonList, with 3 buttons, I add C # code programmatically The fact is that the third button should be on the second line. How can I do this besides creating a new asp: RadioButtonList? I tried adding br and \ r \ n to the title, but this dose did not help me.

ListItem _item1 = new ListItem("1", "1");
ListItem _item2 = new ListItem("2", "2");
ListItem _item3 = new ListItem("3", "3");
rbl.Items.Add(_item1);
rbl.Items.Add(_item2);
rbl.Items.Add(_item3);
+3
source share
2 answers

Use property RepeatColumns? Set it to 2 and the third to line. This creates a column approach. Only the flip side of this, if the labels are long, can look wrong.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobuttonlist.repeatcolumns.aspx

, . , itemdatabound , , break. , , .

+1
0

Source: https://habr.com/ru/post/1707856/


All Articles