zoukankan      html  css  js  c++  java
  • gridview 打开新页 并且传递参数

    在 gridbview 中添加模板列

    <ItemTemplate>
              <asp:LinkButton ID="LinkButtonReport" runat="server" CausesValidation="False"Font-Size="12px" ForeColor="DimGray" Text="报告单" CommandArgument='<%#Bind("RecNumb")%>' OnCommand="LinkButtonReport_Command"></asp:LinkButton>
                                </ItemTemplate>

    然后编写事件

    protected void LinkButtonReport_Command(object sender, CommandEventArgs e)
        {
            string RecNumb = e.CommandArgument.ToString();                    //传参,传的是gridview这个行的主键
            //this.ClientScript.RegisterStartupScript(this.GetType(), "NotComplete ", "<script> window.open('ReportsSingle/BBF_Reports_Single.aspx?RecNumb=" + RecNumb + "','_blank','location=no,width=1024,height=768,left=50000,top=5000')</script> ");

            this.ClientScript.RegisterStartupScript(this.GetType(), "NotComplete ", "<script> window.open('ReportsSingle/BBF_Reports_Single.aspx?RecNumb=" + RecNumb + "','_blank','width=1024,height=768')</script> ");
           
        }

  • 相关阅读:
    python RabbitMQ gRPC 实践经验
    python 数据库实践经验
    python GUI相关
    angularjs中的$watch、$digest、$apply
    css选择器优先级
    angularjs基本理解
    如何编写符合web标准的XHTML文档
    跨域问题
    如何养成良好的书写代码习惯
    ie常见兼容问题
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090635.html
Copyright © 2011-2022 走看看