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. http post

http post

Scheduled Pinned Locked Moved C#
questionwinforms
3 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.
  • J Offline
    J Offline
    Jan Vercauteren
    wrote on last edited by
    #1

    Hi , how do i perform an http post to a classic asp page from within a windows forms app? thanks jan www.agilis.be

    K 1 Reply Last reply
    0
    • J Jan Vercauteren

      Hi , how do i perform an http post to a classic asp page from within a windows forms app? thanks jan www.agilis.be

      K Offline
      K Offline
      Kannan Kalyanaraman
      wrote on last edited by
      #2

      You need to do something like this, i havent tested this, but it should work.

      byte [] data = null;
      WebRequest req = WebRequest.Create("http://someurl/page.asp");
      req.Method = "POST";
      req.ContentType = "application/x-www-form-urlencoded";
      Stream output = req.GetRequestStream();
      data = System.Text.Encoding.ASCII.GetBytes ("some string to be posted");
      req.ContentLength = data.Length;
      output.Write (data, 0, data.Length);
      output.Close();

      - Kannan

      J 1 Reply Last reply
      0
      • K Kannan Kalyanaraman

        You need to do something like this, i havent tested this, but it should work.

        byte [] data = null;
        WebRequest req = WebRequest.Create("http://someurl/page.asp");
        req.Method = "POST";
        req.ContentType = "application/x-www-form-urlencoded";
        Stream output = req.GetRequestStream();
        data = System.Text.Encoding.ASCII.GetBytes ("some string to be posted");
        req.ContentLength = data.Length;
        output.Write (data, 0, data.Length);
        output.Close();

        - Kannan

        J Offline
        J Offline
        Jan Vercauteren
        wrote on last edited by
        #3

        hi kannan tx 4 the fast reply. I have yet another question. I need to encode a checkbox value. how do i do that. This is the form .name (11.31 EUR) ccTLD's .be (8.50 EUR)       www.agilis.be

        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