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. Submitting an HTML form within c#

Submitting an HTML form within c#

Scheduled Pinned Locked Moved C#
csharphtmltutorialquestion
4 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.
  • W Offline
    W Offline
    wolfklinker
    wrote on last edited by
    #1

    I am writing a c# windows application and want it to fill out a simple HTML form, submit the form, and return the content of the returned webpage. Is this possible? I know how to use WebRequest and WebResponse to retrieve the content of a specific webpage, but I can not figure out how to retrieve the content of a webpage accessed by submitting a form. Here's what the form looks like for some more info:

    Name: Address? input type="text" size="40" name="address"> City?

    H 1 Reply Last reply
    0
    • W wolfklinker

      I am writing a c# windows application and want it to fill out a simple HTML form, submit the form, and return the content of the returned webpage. Is this possible? I know how to use WebRequest and WebResponse to retrieve the content of a specific webpage, but I can not figure out how to retrieve the content of a webpage accessed by submitting a form. Here's what the form looks like for some more info:

      Name: Address? input type="text" size="40" name="address"> City?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Take a look at the HttpWebRequest.GetRequestStream[^] for HttpWebRequest.GetRequestStream which shows a good example of sending a POST request to a CGI sitting off on some web server. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

      K 1 Reply Last reply
      0
      • H Heath Stewart

        Take a look at the HttpWebRequest.GetRequestStream[^] for HttpWebRequest.GetRequestStream which shows a good example of sending a POST request to a CGI sitting off on some web server. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

        K Offline
        K Offline
        Kraki
        wrote on last edited by
        #3

        I think you meant to point to the example in the HttpWebRequest.GetRequestStream documentation. Also an example of the HTTP POST and some of the offical documentation about the format of the POST body might help explain the Microsoft example.

        K 1 Reply Last reply
        0
        • K Kraki

          I think you meant to point to the example in the HttpWebRequest.GetRequestStream documentation. Also an example of the HTTP POST and some of the offical documentation about the format of the POST body might help explain the Microsoft example.

          K Offline
          K Offline
          Kraki
          wrote on last edited by
          #4

          I messed up the links in the reply. These are the links that I meant to use. HttpWebRequest.GetRequestStream Example of the HTTP POST Offical documentation about the format of the POST body

          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