Tip, if you're as dumb as me....

Results 1 to 4 of 4

Thread: Tip, if you're as dumb as me....

  1. #1
    Joe Mama Guest

    Default Tip, if you're as dumb as me....

    Why didn&#039;t anybody TELL ME that you could do<BR>request("field_name") instead of request.form("field_name")<BR>or request.querystring("field_name")??? Here all this time I&#039;ve been doing silly things like the following when my data can be passed by either a form or a link:<BR><BR>dim var1<BR>dim var2<BR>if request.form("field1") = "" then<BR> var1 = request.querystring("field1")<BR> var2 = request.querystring("field2")<BR>else<BR> var1 = request.form("field1")<BR> var2 = request.form("field2")<BR>end if<BR><BR>When all I needed was:<BR><BR>var1 = request("field1")<BR>var2 = request("field2")<BR><BR>Silly me. Oh well maybe somebody can learn from my mistakes.

  2. #2
    Join Date
    Dec 1969

    Default Do you mean to say ...

    that you don&#039;t know if you are passing values in the form or via the QueryString?<BR><BR>I&#039;m glad I don&#039;t have to debug your code.

  3. #3
    Joe Mama Guest

    Default RE: Do you mean to say ...

    The pages let users choose one of several options from a form, but if there is only one possible option (depending on what&#039;s in the database), then the page uses a response.redirect to continue on to the next page and passes parameters for the only choice through the querystring. Is there a better way?

  4. #4
    Join Date
    Dec 1969

    Default no no no no

    He is saying that you do not have to use the .form and .querystring notation. Request("fieldname" works for both.<BR><BR>--Whol

Posting Permissions

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