examples of "post" and "get" methods of ASP

E

Eitan

Hello,
I would like to know about the methods : post and get of ASP.
What is the difference between them.
Need some samples, and explanation, please.

Thanks :)
 
T

Tim Slattery

Eitan said:
Hello,
I would like to know about the methods : post and get of ASP.
What is the difference between them.
Need some samples, and explanation, please.

This is an HTTP issue, not ASP.

GET is a simple request for a document. All information is sent in the
URL, therefore you can't sent more than - umm - 1000 characters or so
in a GET request.

A POST request sends data in the body of the request, not in the URL.
The amount of data you can send this way is unlimited, you can send
entire files with the proper form syntax.

In ASP, data sent via a GET request is retrieved with the Request
object, data sent via a POST is retrieve with the Form object.
 
B

Bob Barrows [MVP]

Tim said:
This is an HTTP issue, not ASP.

GET is a simple request for a document. All information is sent in the
URL, therefore you can't sent more than - umm - 1000 characters or so
in a GET request.

A POST request sends data in the body of the request, not in the URL.
The amount of data you can send this way is unlimited, you can send
entire files with the proper form syntax.

In ASP, data sent via a GET request is retrieved with the Request
object, data sent via a POST is retrieve with the Form object.

You were right-on, upt to this point.
Data sent by GET is retrieved via the Request object's Querystring
collection.

submittedvalue=Request.Querystring("name_of_form_field")

Data sent by POST is retrieved by the Request object's Form collection:

submittedvalue=Request.Form("name_of_form_field")

Bob Barrows
 
T

Tim Slattery

You were right-on, upt to this point.
Data sent by GET is retrieved via the Request object's Querystring
collection.
Data sent by POST is retrieved by the Request object's Form collection:

Thanks for the correction. I knew I should have looked that up instead
of doing it from memory!
 
M

Michael D. Kersey

Eitan said:
I would like to know about the methods : post and get of ASP.
What is the difference between them.
Need some samples, and explanation, please.

The W3C standard document for HTTP 1.1 is RFC 2616,
"Hypertext Transfer Protocol -- HTTP/1.1", viewable at
http://www.w3.org/Protocols/rfc2616/rfc2616.html

See in particular section 9, "Method Definitions",
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3
wherein it is noted that GET should be both "safe" and "idempotent".

More explanation of the intricacies of HTTP are available
http://rest.blueoxen.net/cgi-bin/wiki.pl
 

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

Forum statistics

Threads
474,161
Messages
2,570,891
Members
47,423
Latest member
henerygril

Latest Threads

Top