473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Replace QueryString part

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!


Jul 19 '05 #1
3 1558
"Targa" <ta*************@alltel.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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%>
TIA!


Jul 19 '05 #2

"Targa" <ta*************@alltel.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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)
Jul 19 '05 #3
Slim wrote on 29 feb 2004 in microsoft.public.inetserver.asp.general:

"Targa" <ta*************@alltel.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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?
Request.QueryString(1)


To keep any errors off:

q = ""
if Request.QueryString.Count>0 then q = Request.QueryString(1)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John | last post by:
I have the following line in my ASP code. If UCase(Trim(CStr(oRset("Suburb"))))=UCase(Trim(CStr(Request.QueryString("link")))) then etc etc end if
1
by: RAW | last post by:
Hi I have a little problem here with my code Iam asp user and Im trying to > use vb.net on this proyect > > Im trying to pass varible to the sql string this is my code > > <Script...
6
by: John . | last post by:
I have a URL in which I am trying to grab its querystring. Its format looks like this: http://www.domain.com/page.asp?theURL=http://www.otherdomain.com/otherpa ge.asp?topic=45&subject=180 My...
1
by: Debbie Davis | last post by:
Hi there, I'm not very good at javascript but I'm using the following to close a child window and refresh a parent window after updating a database. It's within an ASP page. CODE <SCRIPT>...
2
by: Nad | last post by:
Hello, When I navigate to a page, say called Form1.aspx, with a QueryString, any postbacks within Form1.aspx keeps the content of QueryString. However, when I redirect Form1.aspx to itself the...
6
by: Mehdi | last post by:
Hi, I get the following URL on page load: http://www.server1.com?RedirectUrl=http://www.server2.com?id=777 So QueryString will return (after cleaning up via URL Encode/decode) :...
6
by: duncan.welch | last post by:
Hi, I've got a website that uses links for page positioning which works great about 99% of the time. For some reason, 1% of the time I'll get an error when parsing the querystring, as it's...
3
by: Elroyskimms | last post by:
I have to encode an address which contains an ampersand (&) into a URL with various querystring parameters. The following code works fine: URLString = "www.myserver.com?AD1=" &...
6
by: Simon Gare | last post by:
Hi all, is there anyway of separating a string by either a space or + sign, I have an sms.asp page that receives a string in this format below ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.