62,266
社区成员
发帖
与我相关
我的任务
分享
public static System.Collections.ArrayList GetGridViewCheckBoxCheckedValue(GridView gdv, string checkBoxId)
{
System.Collections.ArrayList arr = new ArrayList();
for (int i = 0; i < gdv.Rows.Count; i++)
{
if (((System.Web.UI.HtmlControls.HtmlInputCheckBox)(gdv.Rows[i].FindControl(checkBoxId))).Checked)
{
arr.Add(((System.Web.UI.HtmlControls.HtmlInputCheckBox)(gdv.Rows[i].FindControl(checkBoxId))).Value);
}
}
return arr;
}
