在GridView模版列中设置如下
1 <asp:TemplateField HeaderText="删除"> 2 <ItemTemplate> 3 <asp:CheckBox ID="CheckBox1" runat="server" /> 4 </ItemTemplate> 5 </asp:TemplateField> 6 <asp:TemplateField HeaderText="修改"> 7 <ItemTemplate> 8 <input id="Radio1" name="Radio1" type="radio" value='<%# Eval("groupID") %>' /> 9 </ItemTemplate> 10 </asp:TemplateField>
在后台代码中使用
((CheckBox)GridView1.Rows[i].FindControl("CheckBox1")).Checked;
可以正常判断checkbox是否被选中
而((HtmlInputRadioButton)GridView1.Rows[i].FindControl("Radio1")).Checked;
却在调试的时候报错
因为只有标记了runat="server"的才会被识别
所以只好用Request.Form["Radio1"]的值来判断到底选中了哪个
DjVu转PDF
我的电子书历程
连续翻页浏览器面临的共同问题
对超过2TB的硬盘进行分区需要使用parted
DB2常用命令
CentOS增加网卡
mysql相关参数解读
max_user_connections参数设置试验
mysql最大连接数试验