J
James Wong
Hi! everybody,
I'm facing a quite strange download problem. I use the following code to
download an XML file to client side:
With Response
' clear buffer
Call .Clear()
' specify the type of the downloadable file
.ContentType = "application/octet-stream" ' I have
also tried to change this statement to Response.ContentType = "Text/XML"
, but the result is same
' det the default filename in the FileDownload dialog box
Call .AddHeader("Content-Disposition", "attachment;
filename=""Download.XML""")
' force to flush buffer
Call .Flush()
' download the file
Call .WriteFile("Original.XML")
End With
When the download is finished, I found that some HTML code are attached to
the end of my original XML statements in download file. The HTML code is
what exact the form just before download. I would like to know what causes
this result and the solution. Certainly, I need the XML content only.
Thanks for your attention and kindly advice!
Regards,
James
I'm facing a quite strange download problem. I use the following code to
download an XML file to client side:
With Response
' clear buffer
Call .Clear()
' specify the type of the downloadable file
.ContentType = "application/octet-stream" ' I have
also tried to change this statement to Response.ContentType = "Text/XML"
, but the result is same
' det the default filename in the FileDownload dialog box
Call .AddHeader("Content-Disposition", "attachment;
filename=""Download.XML""")
' force to flush buffer
Call .Flush()
' download the file
Call .WriteFile("Original.XML")
End With
When the download is finished, I found that some HTML code are attached to
the end of my original XML statements in download file. The HTML code is
what exact the form just before download. I would like to know what causes
this result and the solution. Certainly, I need the XML content only.
Thanks for your attention and kindly advice!
Regards,
James