Sign In  Sign Up Live-Chat

A little trouble with the DataUtil.ForceDownload

Last post 03-24-2008, 4:38 PM by Denver Mike. 0 replies.
Sort Posts: Previous Next
  •  03-24-2008, 4:38 PM 118939

    A little trouble with the DataUtil.ForceDownload

    Hello,

    I'm having a little trouble with DataUtil.ForceDownload method.

    Here's what I'm doing:
     DataUtil.ForceDownload(Page, userDirectory + @"\Letters.doc", "Letters.doc", "application/msword", true);

    This line is in the code behind file on a page called Output.aspx.

    The file opens in Word, except that instead of the filename showing as "Letters.doc", the Word title bar shows the file as "Output.axpx (Read Only)".

    What can I do so that the output filename is the name specified instead of the page name?
    Thanks!



     
View as RSS news feed in XML