[英]How to open a popup window when click on AjaxTabpanel in asp.net
[英]How to open two popup window on a button click?
我需要在asp.net C#中单击ona按钮打开两个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);
这两个窗口需要唯一的名称。 尝试更改第二个PopupName,看看它是否有帮助。
我通常会这样做..
string PDFPath = folderpath + filename;
string wndName = "Window" + DateTime.Now;
//this would make the window name unique
.
.
.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.