Dim fs As System.IO.FileS tream = Nothing
fs = File.Open(Serve r.MapPath("Text Files/Agent/" + filenam + ".txt"), System.IO.FileM ode.Open)
Dim btFile(fs.Lengt h) As Byte
fs.Read(btFile, 0, fs.Length)
fs.Close()
Context.ClearEr ror()
With Response
.AddHeader("Con tent-disposition", "attachment;fil ename=" & filenam)
.ContentType = "applicatio n/octet-stream"
.BinaryWrite(bt File)
.End()
End With
See, this code block was runing absolutely fine before using Ajax.Ajax does not support Respone.Write.S o what will be the solution ?Awaiting for your reply.
Please......Ple ase...... Please
fs = File.Open(Serve r.MapPath("Text Files/Agent/" + filenam + ".txt"), System.IO.FileM ode.Open)
Dim btFile(fs.Lengt h) As Byte
fs.Read(btFile, 0, fs.Length)
fs.Close()
Context.ClearEr ror()
With Response
.AddHeader("Con tent-disposition", "attachment;fil ename=" & filenam)
.ContentType = "applicatio n/octet-stream"
.BinaryWrite(bt File)
.End()
End With
See, this code block was runing absolutely fine before using Ajax.Ajax does not support Respone.Write.S o what will be the solution ?Awaiting for your reply.
Please......Ple ase...... Please