views:

19

answers:

1

All I want to do is

  • Get the name-value pairs that were supplied to Request.QueryString
  • Populate a javascript object (aka hash) with keys from the names and values from the values
  • Halt the page if one of the expected hash values is the empty string

The Request.QueryString object is reminding me why I hated classic asp even before it was an abandoned technology. :/

+1  A: 

Querystring contents are treated as string by default i believe..

But if you have to, you can always do String( request.querystring("foo") );

Are the keys known before-hand ? or you want to iterate through the pairs and retrieve both key and value ?

Gaby
Fortunately the keys are known ahead of time. The real problem is the API for Request.QueryString. I resorted to if( Request.QueryString(foo).count == 0) to detect if the "foo" parameter is missing. I still do not know if String() will work since this is javascript-based asp. Thanks a lot for the feedback though. The default String makes sense, but then I wonder why toString() method still does not work. (Not a priority tho, I just want to get the thing finished.)
dreftymac