繁体   English   中英

C#按钮单击打开许多窗口

[英]C# Button click open many windows

我怎样才能在ASP.NET(C#)中只有一个按钮,我可以打开多个窗口?

 <dx:ASPxButton ID="ASPxButton_PrintLetrVoit" runat="server" Text="Impression lettre de voiture" AutoPostBack="False">
                          <ClientSideEvents
                            Click="function (s, e) { e.processOnServer = false; window.open('PrintLettreVoit.aspx?Id=2'); }" />

                        </dx:ASPxButton>

我如何只用一个按钮就可以打开更多窗口?

<dx:ASPxButton ID="ASPxButton_PrintLetrVoit" runat="server" Text="Impression lettre de voiture" AutoPostBack="False">
                          <ClientSideEvents
                            Click="function (s, e) { e.processOnServer = false;
                            var i=0;
                            for (i=0;i<=5;i++)                               
                             window.open('PrintLettreVoit.aspx?Id=i');                            
                             }" />
                        </dx:ASPxButton>

预先谢谢你。

据我了解,您需要在窗口上使用不同的名称。 所以测试一下:

window.open("http://www.google.se", "google");
window.open("http://msdn.microsoft.com/sv-se/", "msdn");

或您的情况:

window.open('PrintLettreVoit.aspx?Id=3','ID3');
window.open('PrintLettreVoit.aspx?Id=7','ID7');

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM