472,342 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Querystring question

A little guidance, please....

I'm trying to pass info through the querystring method, across 3
pages.

In my first page, it is being sent out using:

if regEx.test(strAskedFor) then
response.redirect("/store/catalog_request_frm.asp?
foundUs="&strAskedFor)

It lands on the second page just fine, I check the value using:

strAskedFor = Request.QueryString("foundUs")
response.write(strAskedFor)

Now here is where I'm stuck.....I'm trying to use this info again,
constructing a link, and after much tinkering,
I'm not sure if this is an acceptable use, or I'm just referencing
this wrong.

<a href="/store/catalog_request_frm.asp?foundUs="&strAskedfor>Send me
a Complete Catalog </a><br /><br />
Any assistance would be greatly appreciated!

Sep 18 '07 #1
2 1466
gr*********@yahoo.com wrote:
>
strAskedFor = Request.QueryString("foundUs")
response.write(strAskedFor)

Now here is where I'm stuck.....I'm trying to use this info again,
constructing a link, and after much tinkering,
I'm not sure if this is an acceptable use, or I'm just referencing
this wrong.

<a href="/store/catalog_request_frm.asp?foundUs="&strAskedfor>Send me
a Complete Catalog </a><br /><br />

Server-side variables are not visible to client-side html. You have to
write the value to the Response. There is a shortcut for doing this:
<%="something"%>
does the same thing as
<%Response.Write "something"%>

Applying this to your html, we get (line breaks added for readability):
a href="/store/catalog_request_frm.asp?foundUs=
<%=strAskedfor%>
>
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 18 '07 #2

<gr*********@yahoo.comwrote in message
news:11**********************@q3g2000prf.googlegro ups.com...
>A little guidance, please....

I'm trying to pass info through the querystring method, across 3
pages.

In my first page, it is being sent out using:

if regEx.test(strAskedFor) then
response.redirect("/store/catalog_request_frm.asp?
foundUs="&strAskedFor)

It lands on the second page just fine, I check the value using:

strAskedFor = Request.QueryString("foundUs")
response.write(strAskedFor)

Now here is where I'm stuck.....I'm trying to use this info again,
constructing a link, and after much tinkering,
I'm not sure if this is an acceptable use, or I'm just referencing
this wrong.

<a href="/store/catalog_request_frm.asp?foundUs="&strAskedfor>Send me
a Complete Catalog </a><br /><br />
Any assistance would be greatly appreciated!

<a href="/store/catalog_request_frm.asp?foundUs=<%= strAskedfor%Send me
a Complete Catalog </a><br /><br />

but a btter way of doing it is to put the value into a session variable
Session("strAskedFor") = Request.QueryString("foundUs")

now on any page you go to you can call
Session("strAskedFor")

Sep 18 '07 #3

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

Similar topics

1
by: Deepiceman | last post by:
Hi all, I am new to asp so bear with me. I want to write a page which will load a default page for me with some links and all. lets say someone...
1
by: Deepiceman | last post by:
Hi all, Here's a newbie question for you all. I have a page lets call it main.asp On this page there are 2 links both pointing to the same page...
3
by: Arpan | last post by:
A link has the following URL: <a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%= Request.QueryString("cadd1") %>&cadd2=<%=...
4
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the...
9
by: Doug | last post by:
I need to do the following... FOR myitem IN Request.Querystring 'get the key 'get the value NEXT What do I DIM myitem as? DictionaryEntry...
12
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its...
6
by: Joe | last post by:
Hello All: I have a webform (WebForm1.aspx) that retrieves a value from a database (_formSessionId) the first time that it is posted. After the...
6
by: Helter Skelter | last post by:
hi, i want to have a querystring in a webpage. i dont mind what it does (i just want to experiment with it). how do i get the asp.net page to do...
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...
4
by: =?Utf-8?B?RVcgTmV3Ymll?= | last post by:
My apologies in advance if there is a better forum for this question. Given the following snippet: <script type="text/c#" runat="server">...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.