Repeater checkbox 后台判断选中
<asp:Repeater ID="GridView1" runat="server">
<HeaderTemplate>
<tr>
<th scope="col">
<input id="all" type="checkbox" name="all" onclick="check_all(this,'checkid');" />
</th><th scope="col">订单号</th><th scope="col">下单日期</th><th scope="col">订单详情</th><th scope="col">销售等级</th><th scope="col">订单状态</th><th scope="col"> </th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<input id="checkbox" runat="server" type="checkbox" value="" />
<input type="hidden" id="HiddenID" runat="server" value='<%# DataBinder.Eval(Container.DataItem, "id")%>' />
for (int i = 0; i < GridView1.Items.Count; i++)
{
if (((System.Web.UI.HtmlControls.HtmlInputCheckBox)GridView1.Items[i].FindControl("checkbox")).Checked)
{
string sql = "update OrderBase set orderstate='已接收' where id=" + ((System.Web.UI.HtmlControls.HtmlInputHidden)GridView1.Items[i].FindControl("HiddenID")).Value;
fun.GetFunction().ExecuteSql(sql);
}
}