Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have datagridview and having template fields . in the template field i have three link button and every link click single images open or single pdf open .

So my question is how we can open three file in single click . is it possible , if possible then how can i do this in asp.net webform with c#


Please help me

What I have tried:

I did not having any idea , that how can i do this and which control we take to do this
Posted
Updated 18-Jan-21 4:26am
Comments
[no name] 11-Jan-21 10:22am    
You cycle through the links that you want to open with "one click"; e.g. a "for" loop.

1 solution

One request and response can only contain a single file. If you want to return multiple files in a single response, you will need to use a container file - ie: a zip file.

The built-in support for zip files[^] is not great, so you'll probably have better luck using a third-party library. For example, I've used DotNetZip (NuGet[^], GitHub[^]) to do this.

You may be able to use Javascript to trigger the "click" event on the other links when the user clicks on one link, as Gerry suggested in the comments. However, this could potentially fall foul of the browser's pop-up blocker, which generally tries to block downloads which aren't initiated as the direct result of a user interaction. You would need to test this option in all the browsers you need to support to see if it would work.
 
Share this answer
 
Comments
Member 10194266 19-Jan-21 1:22am    
Thanks for guidance ,
Can you share me example link if any, so i will try this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900