代码:        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="userid" DataSourceID="SqlDataSource1" 
            ForeColor="#333333" GridLines="None">
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <Columns>
                <asp:BoundField DataField="userid" HeaderText="用户帐户" ReadOnly="True" 
                    SortExpression="userid" />
                <asp:BoundField DataField="bookno" HeaderText="书编号" ReadOnly="True" 
                    SortExpression="bookno" />
                <asp:BoundField DataField="bname" HeaderText="书名" ReadOnly="True" 
                    SortExpression="bname" />
                <asp:BoundField DataField="sl" HeaderText="数量" ReadOnly="True" 
                    SortExpression="sl" />
                <asp:BoundField DataField="price" HeaderText="单价" ReadOnly="True" 
                    SortExpression="price" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>请问,如何统计书的总价。还有每种书,多本的价格。

解决方案 »

  1.   

    document获取单价和数量 然后相乘
      

  2.   

    就是现实商品,
    编辑按钮会加入,但是编辑了数量,价格还是没变.
    另外问问...document是啥...
      

  3.   

    新建的web技术交流群,欢迎大家加入一起讨论:
    群号:29037453
      

  4.   

    document.getElementById("tbxuid1").value
      

  5.   

    好的,我去试试看哈。
    我就是使用的gridview作为购物车的`
      

  6.   

    这是repeater的你可以参考一下foreach (Control c in this.rp.Controls)
            {
                txtAcount = c.FindControl("txtAcount") as TextBox;
               
                if (txtAcount!=null)
                {
                    countt = txtAcount.Text;
                  if (Comment.IsNumber(countt)==false)
                  {
                      return;
                    
                  }
                }
            }