SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Silicon Investor, under the hood -- Ignore unavailable to you. Want to Upgrade?


To: SI Dave who wrote (36)1/8/2005 6:44:40 PM
From: Tom C  Respond to of 81
 
I'm used to C# and I can't try this right now but I would look at getting the parameter part of the url string and use the split function if it's basically an array of 'str=name'. Without trying it I'm not sure of the appropiate request object method that would give me the paramater string.

Example URL:someprog.aspx str=jim&str=biff&str=tad&str=mike&str=bill

StringBuilder strSql = new StringBuilder("DoThis ");

String tmpStr[] = Request.{something}.Split("=");
for each item in tmpStr {
if item != "str"
strSql.Append("'" + item + "',")
}



To: SI Dave who wrote (36)1/8/2005 7:03:20 PM
From: Tom C  Read Replies (1) | Respond to of 81
 
For Each item In Request.form("str")

Another suggestion is:

Request.form("str") returns a string. Each item in the string is a character.

I would try

string Parms[] = Request.form("str");

To see if that works.



To: SI Dave who wrote (36)1/11/2005 8:01:40 PM
From: Green Receipt  Read Replies (1) | Respond to of 81
 
I know you already solved this but why were you getting an extra ',' printed? ( between m in jim and b in biff )



'j','i','m',',','b','i'



To: SI Dave who wrote (36)2/3/2005 4:24:49 PM
From: SI Bob  Respond to of 81
 
First, request.form(str)? Not request.querystring(str)?

Also, I had no idea you could pass multiple vars of the same name.

How about ?str=jim,biff,tad,mike,bill

I do something like this in search where I can then do something like
Dim ThisAry as split(request.querystring(str),",")

Then

Dim x as int=0
for x=0 to ubound(Thisary)
do whatever
next