473,396 Members | 1,827 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,396 software developers and data experts.

What is the difference between REQUEST and REQUEST.QUERYSTRING?

What is the difference between these two statements? They seem to do the
same thing...

response.write(request("variable"))

response.write(request.querystring("variable"))


Jul 19 '05 #1
6 11777
Try this:

<form method="post" action="somepage.asp?x=6">
<input name="x" type="text" value="0">
<input type="submit">
</form>

On somepage.asp put:

response.write request("x")

What do you get? 6 or 9?
The request collection contains the querystring and form collections.
Always specify what you mean, either request.form or request.querystring.
Don't use just request by itself. It'll come back to bite you - especially
when you go to .net. :] Always qualify everything.

Ray at home
"michaaal" <re******@verizon.net> wrote in message
news:OQ**************@TK2MSFTNGP10.phx.gbl...
What is the difference between these two statements? They seem to do the
same thing...

response.write(request("variable"))

response.write(request.querystring("variable"))

Jul 19 '05 #2
Perfect answer, Ray. Extremely informative and also very practical. Thank
you!

"Ray at <%=sLocation%>" <ra*@ajf8jalskdfna.sefrhja7yasdf.com> wrote in
message news:OV**************@TK2MSFTNGP12.phx.gbl...
Try this:

<form method="post" action="somepage.asp?x=6">
<input name="x" type="text" value="0">
<input type="submit">
</form>

On somepage.asp put:

response.write request("x")

What do you get? 6 or 9?
The request collection contains the querystring and form collections.
Always specify what you mean, either request.form or request.querystring.
Don't use just request by itself. It'll come back to bite you - especially when you go to .net. :] Always qualify everything.

Ray at home
"michaaal" <re******@verizon.net> wrote in message
news:OQ**************@TK2MSFTNGP10.phx.gbl...
What is the difference between these two statements? They seem to do the same thing...

response.write(request("variable"))

response.write(request.querystring("variable"))


Jul 19 '05 #3
In addition to Ray's explanation: http://www.aspfaq.com/2111


"michaaal" <re******@verizon.net> wrote in message
news:OQ**************@TK2MSFTNGP10.phx.gbl...
What is the difference between these two statements? They seem to do the
same thing...

response.write(request("variable"))

response.write(request.querystring("variable"))

Jul 19 '05 #4
Ray at <%=sLocation%> wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
<form method="post" action="somepage.asp?x=6">
<input name="x" type="text" value="0">
<input type="submit">
</form>

On somepage.asp put:

response.write request("x")

What do you get? 6 or 9?


Real magic, I always seem to get 9 !

Where does this 9 come from? is it 6*1.5 ?

;--}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5
Ray at <%=sLocation%> wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
No, you see, if you don't specify, it takes the querystring value and
returns it inverted. So, if you had a querystring of L, you'd get 7 as a
result, and if your querystring is a W, you'd get an M, and so on.


That is why my regionalisation to Hieroglyphic LCID=96669 did invert
Horeb's eye "H" in the query stylus, while displaying the pictogram "N" for
water correctly.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #6
Aaron Bertrand - MVP wrote:
So be sure that names don't conflict.

Or, be sure to explicitly call the collection you are using. :-)


Yes, much better!8^)
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: diadia | last post by:
string s = "hello"; const char *p = s.begin(); cout << p << endl; // print hello s = ""; char *p2= s.begin(); cout << p2 << endl; // print hello why?????
11
by: J Wang | last post by:
dear, I debug the program recently as follows. #include <sys/stat.h> int main(int argc, char *argv) { struct stat buf;
0
by: programer | last post by:
Can I use Activex (as vb) to connect database when I use vc.net.
1
by: FD | last post by:
For performance reason, the follwoing code (C#) to capture all the Request collection contexts is NOT recommended: string ID = Request.QueryString; But how to Capture the individual Request...
0
by: Per Bolmstedt | last post by:
In my web.config, the default requestEncoding is set to X. However, I have a web form to which I know that Y encoded data will sometimes be POSTed. This data will be garbled when accessed...
1
by: Raheemulla Khan | last post by:
can any body through a light on this question with an example
2
by: rn5a | last post by:
Assume that an ASPX page is accessed using the following URL: http://myserver/Page1.aspx?fname=john The value of the querystring fname (which is john) can be retrieved using both...
0
by: RupeshDeenadayalan | last post by:
Is there any difference between a boot loader and a boot strapper.It would be better if any one can tell what operations does a general bootloader,boot strapper,BSP,Driver does???
5
by: bhushanbagul | last post by:
Hi All Please let me know exactly what difference i and g makes in oracle version i.e. when we say oracle 10g or oracle 11i Thanks Bhushan
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.