zoukankan      html  css  js  c++  java
  • 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)
                //        {               
                //        }
                //    }
                //}

  • 相关阅读:
    小程序游戏如何接入支付呢?
    手机回复小程序客服消息
    小程序客服发送卡片消息
    小程序多客服对应售前售后,或者不同的客服人员
    php 7 event 安装
    workerman相关
    树莓派:你是我的眼
    Python应用03 使用PyQT制作视频播放器
    从写博到出书:过程全记录
    协议森林17 我和你的悄悄话 (SSL/TLS协议)
  • 原文地址:https://www.cnblogs.com/freexiaoyu/p/1785875.html
Copyright © 2011-2022 走看看