Parse Querystring

Results 1 to 3 of 3

Thread: Parse Querystring

  1. #1
    Join Date
    Dec 1969

    Default Parse Querystring

    If I have the result of <BR><BR>response.write request.querystring<BR><BR>as the following <BR><BR>key=47&key=54&key=67<BR><BR>how do I parse the queyrstrying for <BR>a=47<BR>b=54<BR>c=67<BR><BR>or otherwise split it up into three different parts?

  2. #2
    Ghreddy Guest

    Default RE: Parse Querystring

    HI<BR> just use<BR><BR>&#060;%<BR>for each el in request.querystring<BR> response.write el & " = " & request(el) & "<BR>"<BR>next<BR>%&#062;

  3. #3
    Join Date
    Dec 1969

    Default Use the Split Function

    In your case, if you do this:<BR><BR>Keys = request.queryString("Key")<BR>&#039;keys has the value of "47, 54, 67"<BR><BR>Then you use the Split function to "parse" it:<BR><BR>KeysArray = Split(Keys, ", ") &#039;make sure there&#039;s a space after the comma<BR><BR>Then you can access each vlue individually cuz its in an array:<BR><BR>response.write KeysArray(1) &#039;54<BR><BR>

Posting Permissions

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