map.asp?gt=R&gc=21&L=1&T=RR&pw=muskoka&map=1&cid=1212312&sid=333455
the problem is that i need to append sid and cid parameters to url, but its
possible that those already exist in original url. how can i replace
specific values with others
for example, if cid or sid exist then replace its values with new ones
cid=12312312 replaced cid=9999999
thanks
stephane
---
Tim De Vogel
S-Data NV
"Stephane Viau" <sv...@crea.ca> schreef in bericht
news:eDfSdXpICHA.3924@tkmsftngp10...
I assume you're using a code page here.
Put the url (or the querystring) into a string variable
and use the string.IndexOf function to determine whether
cid or sid exist, and append if necessary.
Alex
>.
>
thanks
stephane
"Eph0nk" <tim.antispam...@s-data.be> wrote in message
news:3d23061b$0$8145$ba62...@news.skynet.be...
---
Tim De Vogel
S-Data NV
"Stephane Viau" <sv...@crea.ca> schreef in bericht
news:uUgpvwpICHA.2212@tkmsftngp12...
I would find the beginning of the query string by using instr to find
the question mark, then split the query string into an array.
intPos = instr(strURL,"?")
strQSparms = split(mid(strURL,strPos+1),"&")
then, you can loop through the array looking for sid and cid
for intPos = 0 to UBound(strQSparms)
...
loop
if you find sid= or cid=, in lcase(left(strQSparms(intPos),4))
then replace them and set an indicator. Then, confert the array back
to a string, as in
strNewQstring = Join(strQSParms,"&")
then, if you failed to find sid=, append it to strNewQstring. Same for
cid.
Jim Buyens
buy...@interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Web Database Development Step by Step .NET Edition ||
|| ||
|| From Microsoft Press ||
|/----------------------------------------------------\|
*------------------------------------------------------*