Hi there,
I'm trying to send multiple files from the server to a browser without any user intervention to a default path on the client's machine.
This is using vbscript on asp.
To do this, I'm trying to use an xml object and using the ado.stream object, put each file in a different node and send it back as a binary response back to the client
But … i'm getting back this error:
Error Type:
Response object, ASP 0185 (0x80020003)A default property was not found for the object.
To track the error i simplified the code and i'm just sending the filename to see what the error is ... the code is :
<%@ LANGUAGE=VBScript%>
<% Option Explicit
Dim objStream
Dim xml_dom
Dim l_node1
set xml_dom = CreateObject("MSXML2.DOMDocument"
xml_dom.loadXML("<?xml version='1.0' ?> <root/>"
xml_dom.documentElement.setAttribute "xmlns:dt", "urn:schemas-microsoft-com:datatypes"
set l_node1 = xml_dom.createElement("Filename"
l_node1.text = "MyFile"
xml_dom.documentElement.appendChild l_node1
Response.ContentType = "binary/octet-stream"
Response.BinaryWrite xml_dom
set xml_dom = nothing
set l_node1 = nothing
%>
Thanks for your help !!!!!!!!!!!!!
I'm trying to send multiple files from the server to a browser without any user intervention to a default path on the client's machine.
This is using vbscript on asp.
To do this, I'm trying to use an xml object and using the ado.stream object, put each file in a different node and send it back as a binary response back to the client
But … i'm getting back this error:
Error Type:
Response object, ASP 0185 (0x80020003)A default property was not found for the object.
To track the error i simplified the code and i'm just sending the filename to see what the error is ... the code is :
<%@ LANGUAGE=VBScript%>
<% Option Explicit
Dim objStream
Dim xml_dom
Dim l_node1
set xml_dom = CreateObject("MSXML2.DOMDocument"
xml_dom.loadXML("<?xml version='1.0' ?> <root/>"
xml_dom.documentElement.setAttribute "xmlns:dt", "urn:schemas-microsoft-com:datatypes"
set l_node1 = xml_dom.createElement("Filename"
l_node1.text = "MyFile"
xml_dom.documentElement.appendChild l_node1
Response.ContentType = "binary/octet-stream"
Response.BinaryWrite xml_dom
set xml_dom = nothing
set l_node1 = nothing
%>
Thanks for your help !!!!!!!!!!!!!