Downloading a pdf open in a new tab






















If you want to download file, add below line, after this Response. You need to create a form to post your data, append it your dom, post your data and remove the form your document body. However, form post wouldn't post data to new tab only on EDGE browser. But a get request works as it's just opening new tab with a url containing query string for your action parameters. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to open PDF file in a new tab or window instead of downloading it using asp. Ask Question. Asked 9 years, 11 months ago. Active 2 years, 5 months ago.

Viewed k times. This is the code for downloading the file. Open, System. Length]; fs. Read ar, 0, int fs. Length ; fs. Close ; Response. BinaryWrite ar ; Response. End ; When this code is executed, it will ask user to open or save the file. NOTE: File won't necessary be located in the website folder.

It might be located in an other folder. Bobrovsky 13k 19 19 gold badges 74 74 silver badges bronze badges.

You could try content-disposition: inline instead of attachment - See this article — Didier Ghys. Add a comment. Active Oldest Votes. Nina Nina 10 10 silver badges 17 17 bronze badges. TransmitFile Response. The first step im interested to know more.

The second step is not practical in my program. Using the first step can i redirect the file to another window? You can not open a new window from server side. Sorry this didn't help. Thanks for your feedback. Choose where you want to search below Search Search the Community. Hi friends, I have a problem with my IE.

What should I do with it? Thanks in advance! This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question Report abuse.

Details required :. The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE.

Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile.

Reducing the weight of our footer. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.



0コメント

  • 1000 / 1000