如何在数据列表控件中使用单选按钮 [英] How to Use Radio Buttons inside Data List Control

查看:47
本文介绍了如何在数据列表控件中使用单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用数据列表控件中的单选按钮.
但是它不能正常工作,因为有多个选择.

I have the requirement of using the radio buttons inside the data list control.
but it is not working as there are multiple selections.
how to use it so that there is only single selection?

推荐答案

<asp:DataList ID="DataList1" runat="server" DataKeyField="NationalityID"

            DataSourceID="SqlDataSource1" onitemdatabound="DataList1_ItemDataBound">
            <ItemTemplate>
                Nationality:
                <asp:Label ID="NationalityLabel" runat="server"

                    Text='<%# Eval("Nationality") %>' />
                <br />
                <br />
                <asp:RadioButton ID="RadioButton1" runat="server"/>
            </ItemTemplate>
        </asp:DataList>



检查此链接:

http://forums.asp.net/t/1648577.aspx



Check this link :

http://forums.asp.net/t/1648577.aspx


选中此


http://www.codeproject.com/Articles/7960/How-to-group-RadioButtons
check this


http://www.codeproject.com/Articles/7960/How-to-group-RadioButtons


这篇关于如何在数据列表控件中使用单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆