简体   繁体   中英

C# Button click open many windows

how can i do in ASP.NET(C#) only one button clic, i can open more than 1 windows ?

 <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>

how can i open more window only with one button clic ?

<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>

Thanks you in advance.

What I understand you need to have different names on the windows. So test this:

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

Or in your case:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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