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. General Programming
  3. C#
  4. How to downlaod a picture ?

How to downlaod a picture ?

Scheduled Pinned Locked Moved C#
htmlcomhelptutorialquestion
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.
  • G Offline
    G Offline
    gr8tushar
    wrote on last edited by
    #1

    Hii I want to downlaod a picture using my application. I am able to download html pages. can u please tell me how to download picture. i am using this code.. HttpWebRequest webRequest; webRequest = (HttpWebRequest) WebRequest.Create ("http://www2.indiaresult.com/Uttar\_Pradesh/uptech/Rollquery.aspx?id=1116&linkid=NRollNo&rollno=01035" + j.ToString ()); HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse (); StreamReader sr = new StreamReader (webResponse.GetResponseStream(),Encoding.ASCII ); x = sr.ReadToEnd (); StreamWriter writer = new StreamWriter ("c:\\results\\"+ YearCollegeCode + j.ToString ()+".html",false); writer.Write (x); sr.Close (); writer.Close (); please help me. Thank u

    N 1 Reply Last reply
    0
    • G gr8tushar

      Hii I want to downlaod a picture using my application. I am able to download html pages. can u please tell me how to download picture. i am using this code.. HttpWebRequest webRequest; webRequest = (HttpWebRequest) WebRequest.Create ("http://www2.indiaresult.com/Uttar\_Pradesh/uptech/Rollquery.aspx?id=1116&linkid=NRollNo&rollno=01035" + j.ToString ()); HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse (); StreamReader sr = new StreamReader (webResponse.GetResponseStream(),Encoding.ASCII ); x = sr.ReadToEnd (); StreamWriter writer = new StreamWriter ("c:\\results\\"+ YearCollegeCode + j.ToString ()+".html",false); writer.Write (x); sr.Close (); writer.Close (); please help me. Thank u

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      Take a look at the example listed on the HttpWebRequest.GetResponse [^] method, it shows exactly how to do it. - Nick Parker
        My Blog | My Articles

      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