前台DataGrid代码, 第一例全是checkbox<ItemTemplate>
<input id="checkbox1" type='checkbox' name='checked' value='<%# DataBinder.Eval(Container.DataItem, "dj_id")%>'>
</ItemTemplate>
后台我该怎么获取?? 我想要用户所选择的项的value值,听说它回传是数组,有点迷茫,,能给一下详细的代码码?
Request["checkd"]
<input id="checkbox1" type='checkbox' name='checked' value='<%# DataBinder.Eval(Container.DataItem, "dj_id")%>'>
</ItemTemplate>
后台我该怎么获取?? 我想要用户所选择的项的value值,听说它回传是数组,有点迷茫,,能给一下详细的代码码?
Request["checkd"]
解决方案 »
- 请问,时间戳
- c#怎样判断文件是否在读!
- 连接数据库出错,求助,在线等
- C# 打印二进制数占位问题
- button上画的线自动消失了??
- 请问C#写的应用程序,有没有办法不安NET FRAMEWORK可以运行
- 两个问题.哪有那么多需要开发的软件. 和 风险性有多大..
- 请问一下时候在.net2005里面把CheckForIllegalCrossThreadCall置为False会有什么影响吗?比如内存错误或者Win32exception?
- DataGridView 表头合并????????
- window form里面的connectionstring如何写啊
- C#的Winform中 上传doc文件到数据库
- winform的openfiledialog 不能返回到它的parent控件
<HeaderStyle Width="8%"></HeaderStyle>
<ItemTemplate>
<input type="checkbox" runat="server" id="chkSelect" onclick="AddValues(this)" value='<%#DataBinder.Eval(Container.DataItem,"id")%>' NAME="chkSelect"/>
</ItemTemplate>
</asp:TemplateColumn>function AddValues(oChk) {
if(oChk.checked)
Form1.Hd.value += "," + oChk.value;
else
Form1.Hd.value = Form1.Hd.value.replace("," + oChk.value,"");
}
hd是hidden
后台取hd.value就可
{
CheckBox cb = item.Control[1] as CheckBox;
if(cb != null)
{
//dosomething
}
}
HtmlInputCheckBox cb = item.Control[1] as HtmlInputCheckBox