HLRosenberger
asked on
XMLHttpRequest
If I use the XMLHttpRequest object in javascript to POST a blob to the server (see below) , and then the server responds (via Response object) by sending data back down to the client, how can I access that data through the XMLHttpRequest object?
JavaScript:
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://localhost:60421/ProcessBlob.aspx?application=' + application, false);
xhr.send(blob);
VB.NET code:
Response.ClearHeaders()
Response.Clear()
Response.Cache.SetCacheabi lity(HttpC acheabilit y.Private)
Response.Cache.SetMaxAge(N ew TimeSpan(0))
Response.Cache.SetExpires( New DateTime(0))
Response.Cache.SetNoServer Caching()
Response.ContentType = "application/pdf"
Response.AddHeader("conten t-disposit ion", "attachment;filename=""air port.pdf"" ")
Response.BinaryWrite(FileC ontent)
Response.OutputStream.Clos e()
JavaScript:
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://localhost:60421/ProcessBlob.aspx?application=' + application, false);
xhr.send(blob);
VB.NET code:
Response.ClearHeaders()
Response.Clear()
Response.Cache.SetCacheabi
Response.Cache.SetMaxAge(N
Response.Cache.SetExpires(
Response.Cache.SetNoServer
Response.ContentType = "application/pdf"
Response.AddHeader("conten
Response.BinaryWrite(FileC
Response.OutputStream.Clos
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
ASKER