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. Web Development
  3. ASP.NET
  4. What is the difference between HTTP GET and POST method?

What is the difference between HTTP GET and POST method?

Scheduled Pinned Locked Moved ASP.NET
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.
  • C Offline
    C Offline
    crazy_mads
    wrote on last edited by
    #1

    Can i send data through querystring and body using HTTP POST method? mads

    C N U 3 Replies Last reply
    0
    • C crazy_mads

      Can i send data through querystring and body using HTTP POST method? mads

      C Offline
      C Offline
      ca8msm
      wrote on last edited by
      #2

      The GET method passes the data through the querystring whereas the POST passes it through the form.

      Mark, http://aspnetlibrary.com

      1 Reply Last reply
      0
      • C crazy_mads

        Can i send data through querystring and body using HTTP POST method? mads

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        crazy_mads wrote:

        What is the difference between HTTP GET and POST method?

        Get means all informations send by the browser is visible. In post the information is hidden.

        crazy_mads wrote:

        Can i send data through querystring and body using HTTP POST method?

        What do u mean by body ?


        string Cheers = "Navaneeth!!" www.w3hearts.com

        C 1 Reply Last reply
        0
        • N N a v a n e e t h

          crazy_mads wrote:

          What is the difference between HTTP GET and POST method?

          Get means all informations send by the browser is visible. In post the information is hidden.

          crazy_mads wrote:

          Can i send data through querystring and body using HTTP POST method?

          What do u mean by body ?


          string Cheers = "Navaneeth!!" www.w3hearts.com

          C Offline
          C Offline
          crazy_mads
          wrote on last edited by
          #4

          function GetData() { //make the object here // to communicate/send data to the server, you need to add data as a //querystring. for this, make a variable called url. Let it refer to the same //page. Assuming, you have this page called AJAX.aspx, var url='AJAX.aspx'; //if you wanna pass the contents of a textbox named 'txtOrderNumber' //get the textbox var reqdBox = GetObject('txtOrderNumber','input'); //append the value to the url url = url + '?Data=' + reqdBox.value; //the step above is important as this is the only way data is sent to server. //then, open the oxmlhttp object and pass the reqd. parameters. oxmlhttp.open("GET",url,true); //(method, reqd url, async?) //as we are saying GET in the method, we have to pass null as a parameter // for the send() method. ie oxmlhttp.send(null); //this will send the data to the server asynchronously. Now here, when i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring. Mads

          C 1 Reply Last reply
          0
          • C crazy_mads

            function GetData() { //make the object here // to communicate/send data to the server, you need to add data as a //querystring. for this, make a variable called url. Let it refer to the same //page. Assuming, you have this page called AJAX.aspx, var url='AJAX.aspx'; //if you wanna pass the contents of a textbox named 'txtOrderNumber' //get the textbox var reqdBox = GetObject('txtOrderNumber','input'); //append the value to the url url = url + '?Data=' + reqdBox.value; //the step above is important as this is the only way data is sent to server. //then, open the oxmlhttp object and pass the reqd. parameters. oxmlhttp.open("GET",url,true); //(method, reqd url, async?) //as we are saying GET in the method, we have to pass null as a parameter // for the send() method. ie oxmlhttp.send(null); //this will send the data to the server asynchronously. Now here, when i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring. Mads

            C Offline
            C Offline
            crazy_mads
            wrote on last edited by
            #5

            Sorry i made mistake Now here, can i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring. Mads

            1 Reply Last reply
            0
            • C crazy_mads

              Can i send data through querystring and body using HTTP POST method? mads

              U Offline
              U Offline
              User 1475035
              wrote on last edited by
              #6

              Here is the good article that explains HTTP POST and HTTP GET request http://patelshailesh.com/index.php/http-get-and-http-post-in-asp-net

              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