473,809 Members | 2,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replace QueryString part

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

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

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 1568
"Targa" <ta************ *@alltel.net> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi,
Im working with 3 query strings that I dont have control over:

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

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.ServerV ariables("QUERY _STRING") this will include all variables
or use
mypage.asp?var1 =<%=request.Que ryString%>
TIA!


Jul 19 '05 #2

"Targa" <ta************ *@alltel.net> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi,
Im working with 3 query strings that I dont have control over:

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

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.QuerySt ring(1)
Jul 19 '05 #3
Slim wrote on 29 feb 2004 in microsoft.publi c.inetserver.as p.general:

"Targa" <ta************ *@alltel.net> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi,
Im working with 3 query strings that I dont have control over:

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

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.QuerySt ring(1)


To keep any errors off:

q = ""
if Request.QuerySt ring.Count>0 then q = Request.QuerySt ring(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
2512
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
304
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 language="vb" runat="server"> > Sub Page_Load() > 'relative connection > 'Dim strConnection as String = "Provider=Microsoft.Jet.OLEDB.4.0; Data
6
6977
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 code snippet below: sURL = Request.QueryString("theUrl") Response.Write sURL
1
11118
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> function CloseWindow() { if (window.opener && !window.opener.closed) { window.opener.document.location.reload(); window.close();
2
1642
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 content of QueryString is lost. What is the lifetime of QueryString? Thank you.
6
16236
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) : "http://www.server2.com?id=777"
6
1708
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 reading the anchor name as part of the number. e.g. http://www.fluidstyle.co.uk/venuedetails.aspx?venueID=1964#review
3
6663
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=" & HTTPUtility.URLEncode("500 Rt 6 & 209") and then to retrieve it: txtAddress1.text = Request.Querystring("AD1") However, in a different page of code, I loop through the QueryString.AllKeys collection like this:
6
2507
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 http://acompany.co.uk/online/internal/InboundSms.asp?api_id=2920893&from=447912956700&to=447624813579×tamp=2007-04-07+03%3A56%3A42&text=19%2Bdavid the last part text= I need to split into 2 parts I need to read the first part 19 and match that to the db and then deal with the name David, I have...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10640
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10387
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.