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> ");
           
        }

  • 相关阅读:
    ZOJ 3529
    将博客搬至CSDN
    BST 增删查操作 递归/非递归实现
    容器vector容量翻倍增长策略效率分析
    整数分解为若干项之和
    PAT-B-1080 MOOC期终成绩
    最大公约数 + 最小公倍数
    Fibonacci数
    排序
    PAT-B-1020
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090635.html
Copyright © 2011-2022 走看看