zoukankan      html  css  js  c++  java
  • 取repeater里生成的INPUT值

    foreach (RepeaterItem item in dltShiguliebie.Items)
                {
                    string shiguleibie = "";
                    int siwangrenshu = 0;
                    foreach (Control ctl in item.Controls)
                    {
                        if (ctl is HtmlInputText)
                        {
                            if (((HtmlInputText)ctl).Value == "")
                            {
                                siwangrenshu = 0;
                            }
                            else
                                siwangrenshu = Convert.ToInt32(((HtmlInputText)ctl).Value);
                            siwangzongshu = siwangrenshu + siwangzongshu;
                        }
                        if (ctl is Label)
                        {
                            shiguleibie = ((Label)ctl).Text;
                        }
                    }

    <asp:Repeater ID="dltShiguliebie" runat="server">
                <ItemTemplate>
                <tr>
                    <td class="style5">
                        <asp:Label ID="Label1" runat="server" Text='<%#Eval("Shiguleibie")%>'></asp:Label>
                        死亡人数</td>
                    <td class="sctdright">
                    <input id="aa" type="text" name="22" runat="server" onpropertychange="if(!/^\d*(\.\d*)?$/.test(this.value))this.value=this.value.substr(0,this.value.length-1)"/>
                    </td>
                    </tr>
                </ItemTemplate>
               
                </asp:Repeater>

  • 相关阅读:
    .net core2.2
    9_山寨系统调用 SystemCallEntry
    7_API调用
    8_InlineHook
    6_再次开中断STI的正确姿势
    5_中断现场下
    4_中断现场中
    3_中断现场上
    2_多核复杂性
    1_中断提权
  • 原文地址:https://www.cnblogs.com/windphoenix/p/1646633.html
Copyright © 2011-2022 走看看