zoukankan      html  css  js  c++  java
  • Repeater中,寻找TextBox,Lable.等的值

    ASPX
    <asp:Repeater ID="reLibData" runat="server"
    onitemcommand
    ="reLibData_ItemCommand">
    <ItemTemplate>
    <!--show td-->
    <td style=" padding:5px">
    <div class="talStyle">
    <table width="100%" border="0" cellspacing="1" cellpadding="2" style="font-size:12px">
    <tr>
    <td>需求数量</td>
    <td><%#Eval("reserverenum")%></td>
    </tr>

    <tr>
    <td>库存数量</td>
    <td><asp:Label ID="labSaNum" runat="server" Text='<%#Eval("reserverenum")%>' ></asp:Label></td>
    </tr>
    <tr>
    <td>出库数量</td>
    <td><asp:TextBox ID="txtLibOutNum" runat="server" Width="30" MaxLength="4"></asp:TextBox>
    <asp:RegularExpressionValidator ID="RegExtxtLibOutNum" ControlToValidate="txtLibOutNum"
    runat
    ="server" ValidationExpression="^[1-9][0-9]*$" ErrorMessage="请输入大于0的数."></asp:RegularExpressionValidator>
    </td>
    </tr>
    <tr>
    <td align="center" align="center" colspan="2"><asp:LinkButton ID="lnkLibOut" runat="server" Text="出 库" CommandArgument='<%#Eval("reserve_goods_id")%>' CommandName="comLibOut"></asp:LinkButton> &nbsp;&nbsp;<a href="###" onclick="updateData(<%#Eval("reserveid") %>)"> 查看订单 </a> </td>
    </tr>
    </table>
    </div>
    </td>
    <!--end one show-->
    <%#( (Container.ItemIndex+1)%5 ==0)?"</tr><tr>":"" %>
    </ItemTemplate>
    </asp:Repeater>
    CS
    protected void reLibData_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
    if (e.CommandName == "comLibOut")
    {
    Helper.Page.MsgShow(
    this, e.CommandArgument.ToString());
    TextBox _txtnum
    = (TextBox)reLibData.Items[e.Item.ItemIndex].FindControl("txtLibOutNum"); //出库数量
    int _liboutnum = Convert.ToInt32(_txtnum.Text.ToString() == "" ? "0" : _txtnum.Text.ToString() );
    if (_liboutnum<1)
    {
    Helper.Page.MsgShow(
    this, "请输入一个大于0的数.");
    return;
    }
    Label _labsanum
    = (Label)reLibData.Items[e.Item.ItemIndex].FindControl("labSaNum"); //库存数量
    int _datasavenum = Convert.ToInt32(_labsanum.Text.ToString());
    }
    }
  • 相关阅读:
    【转】提高VR渲染速度的最好方法(经典转载)
    【转】提高VR渲染速度的关键
    【转】怎样提高VR渲染速度
    MySql学习05---数据类型
    MySql学习04----数据库表的基本操作
    MySql学习03----数据库基本操作
    MySql学习02----SQL编程的基本概念
    MySql学习01----数据库简介
    MySql学习路线00
    maven07-----maven中的聚合与继承
  • 原文地址:https://www.cnblogs.com/eastday/p/1728927.html
Copyright © 2011-2022 走看看