Passing a query?

Results 1 to 2 of 2

Thread: Passing a query?

  1. #1
    Join Date
    Dec 1969

    Default Passing a query?

    Is it possible to pass a query with two words<BR><BR>EX:<BR><BR>recipes.asp?category=main dishes<BR><BR>If I do like above, I get an error message. Any suggestions. The category also gets printed in various places so I don&#039t want to do <BR><BR>main_dishes<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Passing a query?

    Have your query(main dish) put in a string. <BR><BR>Dim strInput, arrResult, i<BR><BR>strInput = request.querystring("category")<BR>arrResult = Split(strInput, " ")<BR><BR>For i = 0 To UBound(arrResult)<BR>Response.write "word #" & i+1 & " word is " & arrResult(i)<BR>Next<BR><BR>This is for if your listing something. You can easily make it into a variable and just replace the word with the variable.<BR><BR>Or you can use main_dish and replace _ with a space.<BR><BR>Input = request.querystring("category")<BR>Result = Replace(Input, "_", " ")<BR><BR>Jeremy

Posting Permissions

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