• 取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>

  • 相关阅读:
    进阶篇-用户界面:10.点九切图法在androidUI中的使用
    进阶篇-用户界面:9.android动画-布局动画
    进阶篇-用户界面:8.android动画-动画侦听和自定义动画
    20162309《程序设计与数据结构》第二学期课程总结
    规格说明书
    团队开发项目实验报告
    Dijkstra算法课后补分博客
    图的深度优先遍历课后补分博客
    图的广度优先遍历课下补分博客
    20162309《程序设计与设计结构》第四次实验报告
  • 原文地址:https://www.cnblogs.com/windphoenix/p/1646633.html
Copyright © 2020-2023  润新知