本帖最后由 QQ277098283 于 2012-06-16 19:00:33 编辑

解决方案 »

  1.   


    --前台改一点
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand"...
    <asp:Button ID="ButIsPay" runat="server" Text=" 确认付款" CommandName="Pay" />
    --后台
     protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
            {
                if (e.CommandName == "Pay")
                {
                    //处理你要处理的事
                    Button ButIsPay = e.CommandSource as Button;
                    Label LabIsPay = ButIsPay.Parent.FindControl("LabIsPay") as Label;
                    ButIsPay.Visible = false;
                    LabIsPay.Visible = true;
                }
            }
      

  2.   

    怎么获得shoppingcarid啊    现在主要要求获得shoppingcarid
      

  3.   

    并且使用1楼你的方法之后报错误“GridView1_RowCommand”的重载均与委托“System.Web.UI.WebControls.GridViewCancelEditEventHandler”不匹配 F:\Visual Studio 2010\测试1\User\ShoppingCar.aspx