zoukankan      html  css  js  c++  java
  • ASP.NET(C#)——加一列按钮

    if (e.CommandName == "select")
                {
                    //获取点击按钮的行号 
                    GridViewRow drv = ((GridViewRow)(((Button)(e.CommandSource)).Parent.Parent)); //此得出的值是表示那行被选中的索引值
                    //按照Gridview取数
                    GoodID = GridView1.Rows[drv.RowIndex].Cells[0].Text;
                    Name = GridView1.Rows[drv.RowIndex].Cells[1].Text;
                    price =Convert.ToDouble(GridView1.Rows[drv.RowIndex].Cells[2].Text);
                    Quantity =Convert.ToInt32( GridView1.Rows[drv.RowIndex].Cells[3].Text);
                    Response.Redirect("~/Emp/MakeOrder.aspx?GoodID="+GoodID+"&Name="+Name+"&price="+price+"&Quantity="+Quantity);
                }
  • 相关阅读:
    WCF上传下载文件
    WCF使用相关
    .net WCF WF4.5 状态机、书签与持久化
    .net WCF WF4.5
    CSS小东西
    asp.net mvc导出execl_转载
    winform自定义控件开发
    html问题汇总
    工作中的小东西
    jQuery事件
  • 原文地址:https://www.cnblogs.com/bluewhy/p/5251913.html
Copyright © 2011-2022 走看看