(一)购物车全选的实现 其实没什么意义呀只是为展示一个全选的实现直接清空请看(二)实现下清空购物车
先加个[全选]按钮
<div>
<asp:LinkButton ID=btn_checkall runat=server onclick=btn_checkall_Click>全选</asp:LinkButton>
</div>
protected void btn_checkall_Click(object sender EventArgs e)
{
if (dtRowsCount < )
return;
for (int i = ; i < dtRowsCount; i++)
dtRows[i][] = true;
thisRepeaterDataBind()
}
(二)实现下清空购物车
先加个[清空购物车]
protected void Button_Click(object sender EventArgs e)
{
if (RequestCookies[CarInfo] == null)
{
return;
}
cok = RequestCookies[CarInfo];
cokExpires = DateTimeNowAddDays()
ResponseAppendCookie(cok)
}