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. Required data through http connection

Required data through http connection

Scheduled Pinned Locked Moved C#
questionsysadminclouddata-structurescryptography
6 Posts 4 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
    honeyashu
    wrote on last edited by
    #1

    Hi, I am working on a windows application in which I have to send a http url to a server which returns me the data which i have to enter to a hash table. I am unable to create the http connection to the server. Please help how can i write that method url is smthing like in which i have to paas 2 parameters which returns me a string . e.g. http://202.87.50.140:6000/Services/asd.getprice?Item=$Item$&Code=$Code$

    M S L 3 Replies Last reply
    0
    • H honeyashu

      Hi, I am working on a windows application in which I have to send a http url to a server which returns me the data which i have to enter to a hash table. I am unable to create the http connection to the server. Please help how can i write that method url is smthing like in which i have to paas 2 parameters which returns me a string . e.g. http://202.87.50.140:6000/Services/asd.getprice?Item=$Item$&Code=$Code$

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      WebClient LobjWebClient = new WebClient();
      string LstrData = LobjWebClient.DownloadString("http://www.google.com");

      Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      1 Reply Last reply
      0
      • H honeyashu

        Hi, I am working on a windows application in which I have to send a http url to a server which returns me the data which i have to enter to a hash table. I am unable to create the http connection to the server. Please help how can i write that method url is smthing like in which i have to paas 2 parameters which returns me a string . e.g. http://202.87.50.140:6000/Services/asd.getprice?Item=$Item$&Code=$Code$

        S Offline
        S Offline
        SeMartens
        wrote on last edited by
        #3

        Hi, do you get any exception/error when opening the connection? (If you just wanted to know how to build a httpconnection, use HttpWebRequest and HttpWebResponse). Regards Sebastian

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        H 1 Reply Last reply
        0
        • H honeyashu

          Hi, I am working on a windows application in which I have to send a http url to a server which returns me the data which i have to enter to a hash table. I am unable to create the http connection to the server. Please help how can i write that method url is smthing like in which i have to paas 2 parameters which returns me a string . e.g. http://202.87.50.140:6000/Services/asd.getprice?Item=$Item$&Code=$Code$

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          what kind of exception did you get ?

          1 Reply Last reply
          0
          • S SeMartens

            Hi, do you get any exception/error when opening the connection? (If you just wanted to know how to build a httpconnection, use HttpWebRequest and HttpWebResponse). Regards Sebastian

            It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

            H Offline
            H Offline
            honeyashu
            wrote on last edited by
            #5

            Actually I don't know how to write code for that .. I am really new to this ..

            L 1 Reply Last reply
            0
            • H honeyashu

              Actually I don't know how to write code for that .. I am really new to this ..

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Just use this code from MSDN : http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^]

              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