我需要在 asp.net C# 中单击一个按钮时打开两个 pdf 文件作为弹出窗口,但现在它只打开第一个弹出窗口?有人可以帮我同时打开两个窗口吗?
这是我的代码:
string PDFPath = folderpath + filename;
string PopupName = "popUp";
string PopupSettings = "height=900,width=1000,top=100,left=100,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,status=yes";
string NewPath = "var popup=window.open('../PopupForReport.aspx?pdfPath="
+ PDFPath.Replace("\\", "/") + "','" + PopupName + "','" + PopupSettings + "')";
ScriptManager.RegisterStartupScript(updatePanel1, updatePanel1.GetType(), "popupOpener", NewPath, true);
string PDFPath1 = folderpath + filename1;
string PopupName = "popUp";
string PopupSettings = "height=900,width=1000,top=100,left=100,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no,status=yes";
string NewPath1 = "var popup=window.open('../PopupForReport.aspx?pdfPath="
+ PDFPath1.Replace("\\", "/") + "','" + PopupName + "','" + PopupSettings + "')";
ScriptManager.RegisterStartupScript(updatePanel1, updatePanel1.GetType(), "popupOpener", NewPath1, true);