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

  • 相关阅读:
    关于头文件
    函数重载和函数模板
    引用和内联函数
    OpenCV中图像处理
    MFC中关于子进程创建和关闭操作
    MFC中的CListControl控件
    MFC中Picture控件显示图像
    MFC CString 和int相互转化
    MFC下拉框
    MFC中关于CListBox控件添加水平滚动条
  • 原文地址:https://www.cnblogs.com/tongdengquan/p/6090635.html
Copyright © 2011-2022 走看看