The new line is not due to the label control. By default the RadioButtonList is rendered as a HTML table and this forces the Radiobuttonlist to be rendered on a separate line. There are two ways to solve your problem
1. Change the RepeatLayout of your Radiobuttonlist by setting RepeatLayout="Flow" as given below
2. If you prefer the Table layout, then the workaround is to enclose your label and Radiobuttonlist within a single <tr> tag like given below. This will force the label and radionbuttonlist to be on the same line
本文介绍了两种解决ASP.NET中RadioButtonList默认换行的方法:一是通过设置RepeatLayout为Flow来实现水平布局;二是使用表格布局并在同一<tr>标签内放置Label和RadioButtonList,以确保它们位于同一行。
463

被折叠的 条评论
为什么被折叠?



