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 send HTTP request from C# code?

How to send HTTP request from C# code?

Scheduled Pinned Locked Moved C#
csharptutorialquestion
6 Posts 3 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.
  • A Offline
    A Offline
    Affan Toor
    wrote on last edited by
    #1

    Hi! I want to open a user specified URL from C# code, i am using C# 2005. Can any body tell me how will i do it? Thanks, Regards, Affan Ahmad Toor

    J J 2 Replies Last reply
    0
    • A Affan Toor

      Hi! I want to open a user specified URL from C# code, i am using C# 2005. Can any body tell me how will i do it? Thanks, Regards, Affan Ahmad Toor

      J Offline
      J Offline
      Jax_qqq
      wrote on last edited by
      #2

      use System.Diagnostics.Process.Start("http://www.google.com"); put your URL in place of google.com Enjoy ;)

      Anuj

      A 1 Reply Last reply
      0
      • A Affan Toor

        Hi! I want to open a user specified URL from C# code, i am using C# 2005. Can any body tell me how will i do it? Thanks, Regards, Affan Ahmad Toor

        J Offline
        J Offline
        Judah Gabriel Himango
        wrote on last edited by
        #3

        Google is your friend: HttpRequest[^]

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        J 1 Reply Last reply
        0
        • J Judah Gabriel Himango

          Google is your friend: HttpRequest[^]

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          J Offline
          J Offline
          Jax_qqq
          wrote on last edited by
          #4

          No that was just a example...and yes try to understand requirement! "I want to open a user specified URL from C# code"...

          Anuj

          J 1 Reply Last reply
          0
          • J Jax_qqq

            No that was just a example...and yes try to understand requirement! "I want to open a user specified URL from C# code"...

            Anuj

            J Offline
            J Offline
            Judah Gabriel Himango
            wrote on last edited by
            #5

            Actually, the class I was thinking of was WebRequest[^]. That will allow you to make a request into any URI, including a user-specified URL.

            Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

            1 Reply Last reply
            0
            • J Jax_qqq

              use System.Diagnostics.Process.Start("http://www.google.com"); put your URL in place of google.com Enjoy ;)

              Anuj

              A Offline
              A Offline
              Affan Toor
              wrote on last edited by
              #6

              Thanks for reply, Your suggestion solved my problem but created another problem... i am storing the user defined URL in XML file.. if i store the URL "http://www.google.com" it works perfectly, but when i try to store the URL "http://www.google.com/search?hl=en&q=abc" it corrupts the XML file and gives error "A semi colon character was expected." can you tell me what is the reason behind this error...? Thanks, Regards, Affan Ahmad Toor

              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