By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,277 Members | 1,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,277 IT Pros & Developers. It's quick & easy.

Request.Form("Field Name") Versus Request.QueryString("Field Name")

P: n/a
I want to know what's the differences between
Request.Form("Field Name") and
Request.QueryString("Field Name")

OR they function exactly the same, which is to return the value of the
field??

Thanks,
John
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This is a simplistic explanation:
If the HTTP request method is POST, the user submitted data is in the
Request.Form() collection
If the HTTP request method is GET, then user submitted data is in the
Request.QueryString() collection

However, you can still do:

<form method="post" action="page.asp?data=value">
<input type="text" name="txtName" value="Name">
</form>

and
Request.Form("txtName") will contain "Name"
-and-
Request.QueryString("data") will contain "value"

Cheers
Ken

"John Davis" <jr*******@hotmail.com> wrote in message
news:uF**************@TK2MSFTNGP12.phx.gbl...
: I want to know what's the differences between
: Request.Form("Field Name") and
: Request.QueryString("Field Name")
:
: OR they function exactly the same, which is to return the value of the
: field??
:
: Thanks,
: John
:
:
Jul 19 '05 #2

P: n/a
"John Davis" wrote:

I want to know what's the differences between
Request.Form("Field Name") and
Request.QueryString("Field Name")


They refer to objects in two different collections, each of which may be present
in a request.

From a practical standpoint, the former captures data from forms with METHOD
"post", and the latter with METHOD is "get".

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use of
this email address implies consent to these terms.
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.