Problem saving a file from a web site

Posted on 2005-05-10
Last Modified: 2010-04-07

 I have a crystal report in an app which is exported to PDF format to path C:\Temp\ but when the page is accesed from users' PC the file is stored at C:\Temp\ of my web server and not user's PC's

 How can I make my file to be exported or saved on my user's PC

This is my exporting code

ExportPath = "C:\Temp\";

crDiskFileDestinationOptions.DiskFileName  = ExportPath + "RMA_Report.pdf";
crExportOptions = rpt.ExportOptions ;                        
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;


Thanks in advance
Question by:negreteo
    LVL 33

    Accepted Solution

    Ask yourself, when is the last time that a website has saved a file to your computer, and they told you where they put it?  I certainly hope it is "Never"!   Websites will never have that type of access to your personal computer, that breaks about every security rule out there!

    You can "suggest" they save it, but you can't force them.  I've put the code I use to export a crystal report here, I hope you find it usefull!
    LVL 23

    Expert Comment

    raterus is 110% right on the money.

    Author Comment

    I am developing in c#

    Don't you have it in C#

    Anyway I'll try to translate it and test it
    LVL 33

    Expert Comment

    Sorry I don't.  Thank you for taking the initiative to translate, I wish other people would do that!

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now