Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Retrieve Data from web server

Retrieve Data from web server

Scheduled Pinned Locked Moved ASP.NET
sysadminhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hung_ngole
    wrote on last edited by
    #1

    I have the code as below: Dim req As HttpWebRequest = HttpWebRequest.Create("myURL") req.Method = "GET" Dim res As HttpWebResponse = req.GetResponse() Dim stream As System.IO.Stream = res.GetResponseStream() Dim buff(100000) As Byte stream.Read(buff, 0, 100000) System.IO.File.WriteAllBytes("C:\Documents and Settings\Yunosuki\Desktop\abc.bmp", buff) That code will send request to web server and get the response! With text format, every things are ok! With the image format, I can see the image of "abc.bmp" file. Thanks for any help! Hung

    O 1 Reply Last reply
    0
    • H hung_ngole

      I have the code as below: Dim req As HttpWebRequest = HttpWebRequest.Create("myURL") req.Method = "GET" Dim res As HttpWebResponse = req.GetResponse() Dim stream As System.IO.Stream = res.GetResponseStream() Dim buff(100000) As Byte stream.Read(buff, 0, 100000) System.IO.File.WriteAllBytes("C:\Documents and Settings\Yunosuki\Desktop\abc.bmp", buff) That code will send request to web server and get the response! With text format, every things are ok! With the image format, I can see the image of "abc.bmp" file. Thanks for any help! Hung

      O Offline
      O Offline
      OmegaCD
      wrote on last edited by
      #2

      Hi, I didn't understand. Are you asking a question or just stating something? :) I'm online at www.KYNOU.com if you need help

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups