Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在网格视图中每次单击按钮或链接时打开不同的新弹出窗口_Javascript_C#_Asp.net - Fatal编程技术网

Javascript 如何在网格视图中每次单击按钮或链接时打开不同的新弹出窗口

Javascript 如何在网格视图中每次单击按钮或链接时打开不同的新弹出窗口,javascript,c#,asp.net,Javascript,C#,Asp.net,每次单击不同行的超链接时,我都会打开相同的弹出窗口,其中包含不同的数据。我的客户希望每次在网格中单击不同的链接时打开多个窗口以查看多个潜在客户的数据。看起来您的思路是正确的。尝试使用_blank作为窗口名称: protected void gvPendingBinds_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) {

每次单击不同行的超链接时,我都会打开相同的弹出窗口,其中包含不同的数据。我的客户希望每次在网格中单击不同的链接时打开多个窗口以查看多个潜在客户的数据。

看起来您的思路是正确的。尝试使用_blank作为窗口名称:

protected void gvPendingBinds_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        Label lblID = (Label)e.Row.FindControl("lblID");
        HyperLink hlOpen = (HyperLink)e.Row.FindControl("hlOpen");
        HyperLink hlEmail = (HyperLink)e.Row.FindControl("hlEmail");
        if (hlEmail.Text != "")
        {
            hlEmail.ToolTip = "Click to open email client with lead loaded";
            hlEmail.NavigateUrl = "mailto:" + hlEmail.Text + "?Subject=Business Insurance quote";
            hlEmail.Style.Add("Cursor", "pointer");
        }

        hlOpen.ToolTip = "Open more details";
        hlOpen.Attributes.Add("onclick", "javascript: window.open('LeadDetails.aspx?id=" + lblID.Text + "', 'window','HEIGHT=800,WIDTH=820,top=50,left=50,toolbar=no,scrollbars=yes,resizable=yes').focus();return true;");            
        hlOpen.Style.Add("Cursor", "pointer");            

    }
} 

lblID.Text在哪里定义?
hlOpen.Attributes.Add("onclick", "javascript: window.open('LeadDetails.aspx?id=" + lblID.Text + "', '_blank','HEIGHT=800,WIDTH=820,top=50,left=50,toolbar=no,scrollbars=yes,resizable=yes').focus();return true;");