Question: GET vs POST method

V

VB Programmer

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.
 
R

Ravikanth[MVP]

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]
 
J

Jos

VB said:
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.
 
V

VB Programmer

GREAT response! Thanks.

Jos said:
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.
 
J

Jerry III

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top