S
Snedker
I'm using (HttpWebRequest and HttpWebResponse to check for updates.
But how do I determine the size of the file before download?
What I have in mind is a status text like
"You have downloaded xxxx of yyyy bytes"
I'm trying to find the y's within this:
---
Dim wr As HttpWebRequest =
CType(HttpWebRequest.Create("http://dbconsult.dk/test/sm.zip"),
HttpWebRequest)
Dim ws As HttpWebResponse = CType(wr.GetResponse(),
HttpWebResponse)
Dim str As Stream = ws.GetResponseStream()
Dim inBuf(10000000) As Byte
Dim bytesToRead As Integer = CInt(inBuf.Length)
But how do I determine the size of the file before download?
What I have in mind is a status text like
"You have downloaded xxxx of yyyy bytes"
I'm trying to find the y's within this:
---
Dim wr As HttpWebRequest =
CType(HttpWebRequest.Create("http://dbconsult.dk/test/sm.zip"),
HttpWebRequest)
Dim ws As HttpWebResponse = CType(wr.GetResponse(),
HttpWebResponse)
Dim str As Stream = ws.GetResponseStream()
Dim inBuf(10000000) As Byte
Dim bytesToRead As Integer = CInt(inBuf.Length)