Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms: Why use Get over Post?

Status
Not open for further replies.

natwod

Programmer
Nov 21, 2002
41
0
0
US
The "get" method for submitting forms seems to be used everywhere! But in an ASP book I have it says that the "post" method is better than "get" in every way: it has no size limitations, is easier to format, and it also doesn't confuse the user with strange stuff in the URL box.

There must be some reason almost EVERYONE (including tek-tips, I just noticed) uses the "get" method. I realize that there are also a lot of links that simply have strings appended to them, but there are still many *forms* that use get.
Anybody know why?
Natwod
 
In the get post we have limitation of sending data also all data which you send you can read in address bar
 
I wouldn't say just about everyone uses GET, it might be safer to say that it is only noticeable there is a form in use when someone uses GET.
GET is much easier to parse out because it exists as a string that is delimited by &'s meaning you can parse it out, if you need it on the next page you can append the current string and pass it along, etc.
Some languages require GET. Sometimes it is easier to set your form to POST but pass some extra values along in the QueryString (ie GET). Sometimes when creating links on a page it is easier to simply add a querystring to the link than to create a form for each and every link, or on form with a lot of javascript (that may or may not work in the clients browser). Etc, I could think of more but I haven't had any coffee yet.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
No more vacation for me :(

FAQ FAQ20-2863
= new Forums.Posting.General.GettingAnswers()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top