473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2932
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mark C | last post by:
I come from a corporate C background and I find style to be important in readability. Especially when multiple people are working on the same code. I have seen 3 way to deal with large bocks of...
11
by: Dave Rahardja | last post by:
OK, so I've gotten into a philosophical disagreement with my colleague at work. He is a proponent of the Template Method pattern, i.e.: class foo { public: void bar() { do_bar(); } protected:...
6
by: brian_mckracken | last post by:
This might not be the right group for this question, since its kind of a pure html question... Given the html construct: <form action='index.php?expand=0,10000' method='post'> Email: <input...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
7
by: Joe Fallon | last post by:
I have a WinForm that is a Base class. It has many controls on it and a lot of generic code behind. When I inherit the form I override 5 methods and now each child form has the same look and feel...
20
by: chris.schwalm | last post by:
This is part II of this <a...
0
by: tony | last post by:
Hello! Below I have three methods it's SavePost, SavePostSetUpTableFlg and SavePostBlowStepFlg. I want to use transaction to keep the data synchronized. All or nothing must be executed. When...
0
by: mirandacascade | last post by:
Operating system: Win XP Version of Python: 2.4 I recognize that this question is not about Python...it has only a tangential Python connection. I'm using a Python package to run a process;...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.