跨越 6 个 DIVS 的 RadioButtonList
关于
类的问题。我有一个 2 行、3 列的 DIV 设置,带有单选按钮选项,如下所示:
() Option 1 | () Option 2 | () Option 3
-----------------------------------------
() Option 4 | () Option 5 | () Option 6
原因是当用户选择不同的选项时,附加信息将通过 jQuery 显示,但我希望所有选项都绑定到 1 个列表,以便在选择选项 1 时没有别的,当选择选项 5 时,它会取消选择选项 1。基本 RadioButtonList 类型的东西。
唉,从我读过/破解的内容来看,使用 asp:RBL 类,您无法在标签之间输入任何 html 或其他代码。
关于如何做到这一点有什么想法吗?如果我保持 ID 相同,则会出错,表示该列表已存在...
感谢您的指点。
编辑:
我相信我找到了解决方案。我没有使用 RadioButtonList,而是使用 RadioButton 并实现了 GroupName 选项将它们绑定在一起。看起来现在正在工作。
Question about the <asp:RadioButtonList>
class. I have a 2 row, 3 column DIV setup with Radio Button options like this:
() Option 1 | () Option 2 | () Option 3
-----------------------------------------
() Option 4 | () Option 5 | () Option 6
Reason being is that when users select different options additional info will be displayed via jQuery but I want all the options tied to 1 list so that when Option 1 is selected nothing else is and when Option 5 is selected it deselects Option 1. Basic RadioButtonList type of stuff.
Alas from what I've read/hacked is that with the asp:RBL class you can't enter any html or other code between the tags.
Any thoughts on how to do this? If I keep the ID the same it errors out saying that list already exists...
Thanks for any pointers.
Edit:
I believe I found the solution. Instead of using a RadioButtonList I just used RadioButton and implemented the GroupName option to bind them together. Looks like it's working now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有几个选择:
我建议使用第一个选项,因为它是最简单的稳健性、功能和简单性的平衡。
You have a few choices:
I suggest the first option as it is the simplest balance of robustness, power, and simplicity.