D
Dorsa
HI, Could you please tell me the error in here. I am trying to open an
XML file from a link.
Response.Clear()
Response.Expires = 0
Response.BufferOutput = False
Response.ContentType = "text/xml"
Response.AddHeader("Content-Disposition",
"filename=test.XML")
Dim OStream As FileStream
Dim FileSize As Long
Dim ds As New DataSet()
OStream = New FileStream(Server.MapPath("test.XML"),
FileMode.Open, FileAccess.Read)
ds.ReadXml(OStream)
FileSize = OStream.Length
Dim Buffer(CInt(FileSize)) As Byte
OStream.Read(Buffer, 0, CInt(FileSize))
OStream.Close()
Response.Write(Buffer)
Response.End()
XML file from a link.
Response.Clear()
Response.Expires = 0
Response.BufferOutput = False
Response.ContentType = "text/xml"
Response.AddHeader("Content-Disposition",
"filename=test.XML")
Dim OStream As FileStream
Dim FileSize As Long
Dim ds As New DataSet()
OStream = New FileStream(Server.MapPath("test.XML"),
FileMode.Open, FileAccess.Read)
ds.ReadXml(OStream)
FileSize = OStream.Length
Dim Buffer(CInt(FileSize)) As Byte
OStream.Read(Buffer, 0, CInt(FileSize))
OStream.Close()
Response.Write(Buffer)
Response.End()