Repeater 得到checkbox值
?Repeater外面事件得到Checkbox值 Checkbox必須是服務器控件
<input type="checkbox" name="checkbox2" id="checkid" runat="server"/>
foreach (RepeaterItem item in this.repjoblist.Items)
??????????? {
??????????????? if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
??????????????? {
??????????????????? //CheckBox cb = item.FindControl("checkid") as CheckBox;
??????????????????? HtmlInputCheckBox cb = item.FindControl("checkid") as HtmlInputCheckBox;
??????????????????? if (cb.Checked)
??????????????????? {
??????????????????? }
??????????????? }
??????????? }
??????????? //for (int i = 0; i < this.repjoblist.Items.Count; i++)
??????????? //{
??????????? //??? //CheckBox cb = (CheckBox)this.repjoblist.Items[i].FindControl("checkid");
??????????? //??? HtmlInputCheckBox cb = this.repjoblist.Items[i].FindControl("checkid") as HtmlInputCheckBox;
??????????? //??? if (cb != null)
??????????? //??? {
??????????? //??????? if (cb.Checked)
??????????? //??????? {???????????????
??????????? //??????? }
??????????? //??? }
??????????? //}
轉載于:https://www.cnblogs.com/freexiaoyu/archive/2010/07/27/1785875.html
總結
以上是生活随笔為你收集整理的Repeater 得到checkbox值的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 总结XX餐饮收银项目中的得与失
- 下一篇: Chrome的一点小问题