Replace QueryString part

T

Targa

Hi,
Im working with 3 query strings that I dont have control over:

mypage.asp?var1=<%=request("somevalue")%>
mypage.asp?var2=<%=request("somevalue")%>
mypage.asp?var3=<%=request("somevalue")%>

My application is expecting only var1.
How can I implement a replace function to replace the var2, and var3 parts
to always be var1?

TIA!
 
E

Egbert Nierop \(MVP for IIS\)

Targa said:
Hi,
Im working with 3 query strings that I dont have control over:

mypage.asp?var1=<%=request("somevalue")%>
mypage.asp?var2=<%=request("somevalue")%>
mypage.asp?var3=<%=request("somevalue")%>

My application is expecting only var1.
How can I implement a replace function to replace the var2, and var3 parts
to always be var1?

Use Request.ServerVariables("QUERY_STRING") this will include all variables
or use
mypage.asp?var1=<%=request.QueryString%>
 
S

Slim

Targa said:
Hi,
Im working with 3 query strings that I dont have control over:

mypage.asp?var1=<%=request("somevalue")%>
mypage.asp?var2=<%=request("somevalue")%>
mypage.asp?var3=<%=request("somevalue")%>

My application is expecting only var1.
How can I implement a replace function to replace the var2, and var3 parts
to always be var1?

TIA!


Request.QueryString(1)
 
E

Evertjan.

Slim wrote on 29 feb 2004 in microsoft.public.inetserver.asp.general:
Request.QueryString(1)

To keep any errors off:

q = ""
if Request.QueryString.Count>0 then q = Request.QueryString(1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top