Professional Web Applications Themes

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

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...

  1. #1

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

    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


    John Davis Guest

  2. #2

    Default Re: Request.Form("Field Name") Versus Request.QueryString("Field Name")

    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" <jrefactorhotmail.com> wrote in message
    news:uFWBAJUZDHA.1492TK2MSFTNGP12.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
    :
    :


    Ken Schaefer Guest

  3. #3

    Default Re: Request.Form("Field Name") Versus Request.QueryString("Field Name")

    "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.


    Dave Anderson Guest

Similar Threads

  1. Replies: 0
    Last Post: August 26th, 06:01 AM
  2. "Page" and "Rect" props of the Field prop in Javascript API
    By ArtIn_Act@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 8
    Last Post: March 19th, 05:35 PM
  3. ERROR: The form field "theFile" did not contain a file.
    By TanzMatias in forum Macromedia ColdFusion
    Replies: 2
    Last Post: May 5th, 07:20 PM
  4. Replies: 2
    Last Post: September 15th, 04:35 AM
  5. dr("field").toString returns "400.0000" instead of "400"
    By Dan C Douglas in forum ASP.NET General
    Replies: 5
    Last Post: July 22nd, 05:48 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