Prompt user to save/open file in asp.net c#


















The browser will take appropriate action based on user settings, i. Posted Jul am Shameel. Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in to your account. This email is in use. Do you need your password? Submit your solution! When answering a question please: Read the question carefully. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.

If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome. Don't tell someone to read the manual. Chances are they have and don't get it. Sign in to vote. Hi All, I am creating an excel file using Microsoft. Please guide Tuesday, June 26, PM. The solution is to make the user "download" the file. This way the browser will ask the user where to put the file somewhere on his disk - save as dialog.

The simplest yay to do this is to provide a link to file when the user does a check-out. When the user click the link the browser will download the file.

The problem with this approach is that if the browser "knows" the file type - like for pdf for example - it will directly open the file in the window instead of showing a save as dialog. This can be avoided by writing the file binary in the response and to set some custom http headers.

Wednesday, June 27, AM. Marufuzzaman Tuesday, June 26, PM. Is there any other way to accomplish this task without using open XML?? Marufuzzaman 0. Hi, Try the link below. Thanks in advance! The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums. Asked by:. Archived Forums. Sign in to vote. As a default these files will open in their browser. I don't want it to automatically open in the browser, I want the box to pop up that asks them if they want to open it or save it to their hard drive.

Any ideas?



0コメント

  • 1000 / 1000