开发者

How to Add Radio Buttons to a Form Vertically?

I am dynamically creating rad开发者_开发知识库io button within code behind in ASP.Net, how do I add the controls so they appear vertically instead of horizontally?


RadioButtonList rbl = new RadioButtonList();
rbl.RepeatDirection = RepeatDirection.Vertical;


You can use RadioButtonList Control with RepeatDirection set to Vertical.
If that is not possible then....

Add them to a ordered list(OL element) or an unordered list(UL).


Possible two ways:

  • Give some CSS class, and in your css give that class some style like

    display:block;

  • Use RadioButtonList control as container to those radio buttons. Set the "RepeatDirection" property to "Vertical".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜