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>

 

 

posted on 2010-01-13 15:50  D.Henry  阅读(552)  评论(0编辑  收藏  举报