All Forums >> [Scripting] >> ASP >> Requesting the String in a Query String Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Ok, I found a solution with a little help from W3Schools
<% Dim printIDs for i=1 to Request.QueryString("n").Count printIDs = printIDs & (Request.QueryString("n")(i) & ",") next %> <% Dim printIDsTrim, printIDsLen If printIDs <> "" then printIDsLen = Len(printIDs) -1 printIDsTrim = Left(printIDs,printIDsLen) end If %>
This gives me the numbers I was looking for from the query string, by adding a default value of the ID to the check box on the first page, it passes values (when checked) in the query string like so.
n=5&n=12
Then the printIDsTrim looks like this 5,12 and I can use it for my IN STATEMENT for SQL, giving me the recordset filter I was looking for.