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

  • 相关阅读:
    进程间通信:命名管道FIFO(2)
    进程间通信:管道(1)
    POSIX线程学习
    进程与信号学习
    堆栈的区别与联系
    浅读《构建之法:现代软件工程》有感
    CSS学习成长记
    jquery学习成长记(一)
    html学习成长记
    Razor视图
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090635.html
Copyright © 2011-2022 走看看