开发者

Group multiple RadioButton lists

I have several Radio Button lists on my page, each lists items under different categories, so they are listed under开发者_Python百科 different headings.

I only want one item to be selected across all the lists however.

Is it possible to "group" the lists so that the affectively behave as one RadioButton Lists?

I want to avoid using jQuery/Javascript if possible


Not using the standard ASP.Net radio button list control I believe. The best thing to do would be to render out your radio buttons one-by-one in their individual lists and of course, set the "name" property so they all belong to the same group.

You could also (depending on the structure of your data) just render all options in one radio button list control and then use the css nth child selectors to insert divs/line breaks/etc. But you would probably need jQuery for this unless your targeting only browsers that supports CSS3.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜