Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Request.Form("Field Name") Versus Request.QueryString("Field Name")

Reply
Thread Tools

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

 
 
John Davis
Guest
Posts: n/a
 
      08-18-2003
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


 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      08-18-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
: 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
:
:


 
Reply With Quote
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      08-18-2003
"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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Mozilla versus IE versus Opera versus Safari Peter Potamus the Purple Hippo Firefox 0 05-08-2008 12:56 PM
equal? versus eql? versus == versus === verus <=> Paul Butcher Ruby 12 11-28-2007 06:06 AM
Certification - MCP versus MCSA versus MCSE =?Utf-8?B?Q2FuYWRhX0d1eU0=?= Microsoft Certification 1 08-24-2006 06:33 PM
script versus code versus ? Russ ASP .Net 1 06-10-2004 03:06 AM
HTML Client Control versus. HTML Server Control versus. Web Server Control Matthew Louden ASP .Net 1 10-11-2003 07:09 PM



Advertisments