在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"]的值来判断到底选中了哪个
位置编码
Nacos 详解,有点东西
从源码里的一个注释,我追溯到了12年前,有点意思。
初看一脸问号,看懂直接跪下!
【git】解决 git clone 时速度较慢
《码处高效:Java开发手册》之代码风格
Nginx的安装与运行
解决windows下WslRegisterDistribution failed with error: 0x80070050的问题
保姆级教程:VsCode调试docker中的NodeJS程序