469,623 Members | 1,935 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Question: GET vs POST method

Can someone provide a simple explanation on the difference between the GET
and POST methods? What are the adv/disadv of both and when should I use
them?

Thanks.
Nov 17 '05 #1
4 2845
Hi

Get and Post are methods used to send data to the server:
With the Get method, the browser appends the data onto
the URL. With the Post method, the data is sent
as "standard input."
It's important for you to know which method you are
using. The Get method is the default, so if you do not
specify a method, the Get method will be used
automatically.

The Get method has several disadvantages:
There is a limit on the number of characters which can be
sent to the server, generally around 100 - 150
characters.
Your user will see the "messy codes" when the data is
sent.

The Bottom Line is With the Get method, your users will
see the "messy codes" in the Location box when they
submit a form. With the Post method, they won't
Hope this gives an idea

Ravikanth[MVP]

-----Original Message-----
Can someone provide a simple explanation on the difference between the GETand POST methods? What are the adv/disadv of both and when should I usethem?

Thanks.
.

Nov 17 '05 #2
Jos
VB Programmer wrote:
Can someone provide a simple explanation on the difference between
the GET and POST methods? What are the adv/disadv of both and when
should I use them?

Thanks.


In addition to Ravikanth's posting:

Use GET:
- during development for debugging purposes (although in ASP.NET it's
also easy to see what has been sent through POST.
- if you want your visitors to be able to bookmark the submitted pages
- if you want to refer to submitted pages using hyperlinks

Use POST:
- for forms with password fields
- for large forms or forms with large text fields

Please note that web forms in ASP.NET use POST by default. It can be
changed into GET, but only for small forms. Web forms can post a lot
of data, especially when ViewState is involved.

--

Jos Branders
Nov 17 '05 #3
GREAT response! Thanks.

"Jos" <jo***************@fastmail.fm> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
VB Programmer wrote:
Can someone provide a simple explanation on the difference between
the GET and POST methods? What are the adv/disadv of both and when
should I use them?

Thanks.


In addition to Ravikanth's posting:

Use GET:
- during development for debugging purposes (although in ASP.NET it's
also easy to see what has been sent through POST.
- if you want your visitors to be able to bookmark the submitted pages
- if you want to refer to submitted pages using hyperlinks

Use POST:
- for forms with password fields
- for large forms or forms with large text fields

Please note that web forms in ASP.NET use POST by default. It can be
changed into GET, but only for small forms. Web forms can post a lot
of data, especially when ViewState is involved.

--

Jos Branders

Nov 17 '05 #4
You should also use POST for all requests that result in changes on the
server (such as updating the database). Clients will automatically resubmit
GET forms but not POST forms if the user refreshes the page (or goes back to
it in their history).

Jerry

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
GREAT response! Thanks.

"Jos" <jo***************@fastmail.fm> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
VB Programmer wrote:
Can someone provide a simple explanation on the difference between
the GET and POST methods? What are the adv/disadv of both and when
should I use them?

Thanks.


In addition to Ravikanth's posting:

Use GET:
- during development for debugging purposes (although in ASP.NET it's
also easy to see what has been sent through POST.
- if you want your visitors to be able to bookmark the submitted pages
- if you want to refer to submitted pages using hyperlinks

Use POST:
- for forms with password fields
- for large forms or forms with large text fields

Please note that web forms in ASP.NET use POST by default. It can be
changed into GET, but only for small forms. Web forms can post a lot
of data, especially when ViewState is involved.

--

Jos Branders


Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mark C | last post: by
11 posts views Thread by Dave Rahardja | last post: by
6 posts views Thread by brian_mckracken | last post: by
10 posts views Thread by glenn | last post: by
7 posts views Thread by Joe Fallon | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.