Professional Web Applications Themes

What is the difference between REQUEST and REQUEST.QUERYSTRING? - ASP

What is the difference between these two statements? They seem to do the same thing... response.write(request("variable")) response.write(request.querystring("variable"))...

  1. #1

    Default 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"))




    michaaal Guest

  2. #2

    Default Re: What is the difference between REQUEST and REQUEST.QUERYSTRING?

    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" <res0gyioverizon.net> wrote in message
    news:OQMfuhnSDHA.1072TK2MSFTNGP10.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"))
    >
    >
    >
    >

    Ray at Guest

  3. #3

    Default Re: What is the difference between REQUEST and REQUEST.QUERYSTRING?

    Perfect answer, Ray. Extremely informative and also very practical. Thank
    you!

    "Ray at <%=sLocation%>" <rayajf8jalskdfna.sefrhja7yasdf.com> wrote in
    message news:OV2AWlnSDHA.1948TK2MSFTNGP12.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" <res0gyioverizon.net> wrote in message
    > news:OQMfuhnSDHA.1072TK2MSFTNGP10.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"))
    > >
    > >
    > >
    > >
    >
    >

    michaaal Guest

  4. #4

    Default Re: What is the difference between REQUEST and REQUEST.QUERYSTRING?

    In addition to Ray's explanation: [url]http://www.aspfaq.com/2111[/url]




    "michaaal" <res0gyioverizon.net> wrote in message
    news:OQMfuhnSDHA.1072TK2MSFTNGP10.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"))
    >
    >
    >
    >

    Aaron Bertrand [MVP] Guest

  5. #5

    Default Re: What is the difference between REQUEST and REQUEST.QUERYSTRING?

    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)
    Evertjan. Guest

  6. #6

    Default Re: What is the difference between REQUEST and REQUEST.QUERYSTRING?

    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)
    Evertjan. Guest

  7. #7

    Default Re: What is the difference between REQUEST and REQUEST.QUERYSTRING?

    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^)
    Michael D. Kersey Guest

  8. #8

    Default What is the difference between REQUEST and REQUEST.QUERYSTRING?

    microsoft.public.inetserver.asp.general:

    Real magic, I always seem to get 9 !

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



    Hi,

    from where this 1.5 come ?
    Unregistered Guest

Similar Threads

  1. request.querystring questions
    By NW in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 3rd, 05:03 PM
  2. request querystring
    By -D- in forum Dreamweaver AppDev
    Replies: 1
    Last Post: February 24th, 09:58 PM
  3. Cannot do simple Request.QueryString on IIS 6.0
    By Danny DiNardo in forum ASP Components
    Replies: 0
    Last Post: June 9th, 04:02 AM
  4. Replies: 4
    Last Post: August 30th, 07:14 AM
  5. Replies: 2
    Last Post: July 4th, 12:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139