ASP.NET中为DataGrid添加单选框 2006-8-24 - 中国WEB开发者网络 (http://www.webasp.net) -- 技术教程 (http://www.webasp.net/article/) --- ASP.NET中为DataGrid添加单选框 2006-8-24 (http://www.webasp.net/article/28/27779.htm) |
| -- 作者:未知 -- 发布日期: 2006-09-12 |
| 使用DataGrid控件添加单选框时,如果直接在模板中加入RadioButton服务器控件,由于.Net的机制,无法将这些RadioButton在客户端出现在同一个组里面。这时我们可以使用Radio标签来实现。
下面是HMTL 页面代码 <form id="Form1" method="post" runat="server"> 下面是Page_Load中的数据绑定代码 Dim arr As New ArrayList 下面是btnOk_Click中获取选择项的代码 Response.Write(Request.Form("rdo")) 下面是设置绑定项中哪个Radio被中的函数 Public Function GetChecked(ByVal str As String) As String |
| webasp.net |