473,327 Members | 2,007 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,327 software developers and data experts.

Third addition to querystring failing to appear

I've got a hyperlink that unfolds with the following info on it:
response.write "<td><font face=verdana size=1><a
href=v_detail_products.asp?price=" & price _
& "&isbn=" & isbn & ">" & rs("title") & "</a></td>"

The _ following price is where the line ends and wraps to the next
line. This current set up works fine. However, mysteriously, if I try
adding a third variable to this line, called title, it fails to appear
at all, not only the content of the variable, but the hard text it
self, as it it was not even entered. For example:
response.write "<td><font face=verdana size=1><a
href=v_detail_products.asp?price=" & price _
& "&isbn=" & isbn & "&title=" & rs("title") & ">" & rs("title") &
"</a></td>"

Not only will the contents of rs("title") not appear, but the string
"&title" will not appear in the hyperlink, as if the word title was
not being recognized for some reason. Can someone answer this mystery
for me?

Thanks,

Bill
Jul 19 '05 #1
2 1516
Gazing into my crystal ball I observed bi***********@gospellight.com (Bill)
writing in news:8d**************************@posting.google.c om:
I've got a hyperlink that unfolds with the following info on it:
response.write "<td><font face=verdana size=1><a
href=v_detail_products.asp?price=" & price _
& "&isbn=" & isbn & ">" & rs("title") & "</a></td>"

The _ following price is where the line ends and wraps to the next
line. This current set up works fine. However, mysteriously, if I try
adding a third variable to this line, called title, it fails to appear
at all, not only the content of the variable, but the hard text it
self, as it it was not even entered. For example:
response.write "<td><font face=verdana size=1><a
href=v_detail_products.asp?price=" & price _
& "&isbn=" & isbn & "&title=" & rs("title") & ">" & rs("title") &
"</a></td>"

Not only will the contents of rs("title") not appear, but the string
"&title" will not appear in the hyperlink, as if the word title was
not being recognized for some reason. Can someone answer this mystery
for me?

Thanks,

Bill


<td><font face="verdana" size="1"><a href="v_detail_products.asp?price=<%
=price%>&amp;isbn=<%=isbn%>&amp;title=<%=rs("title ")%>"><%=rs("title")%>
</a></font></td>

OR:

response.write "<td><font face=" &chr(034) & "verdana" & chr(034) & "
size=" & chr(034) & "1" & chr(034) & "><a href=" & chr(034) &
"v_detail_products.asp?price=" & price & "&isbn=" & isbn & "&title=" & rs
("title") & chr(034) & ">" & rs("title") & "</a></font></td>"

You will notice that every attribute has been quoted. It is always a good
idea to quote attributes, even though HTML 4 does not require it for
numbers, only text. Probably in your case, you are missing some quote
marks. You also did not close the font element, which could potentially
cause issues.

By the way, just to let you know, the font element is depreciated in favor
of CSS. Additionally, you should specify fonts in addition to Verdana, eg,
Arial, Helvetica and add sans-serif as the fall back.

If you use option 1 above, make sure to escape & using &amp;

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #2
Perhaps Server.URLEncode() would help as described below.

Example URL with a querystring:
http://www.mysite.com/mydir/mypg.asp...=hey&myvar2=ho

Because a variable might contain some odd characters like spaces, it's
usually a good idea to use Server.URLEncode when creating a querystring
from a variable:
<a href="http://www.mysite.com/mypage?id=<%=
Server.URLEncode(objRS("MyIDFldFromDB")) %>">objRS("MyIDFldFromDB")</a>

And in the page that is opened you can use Request.QueryString("id") to
get the value of id.

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

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

Similar topics

3
by: Fredrik/Sweden | last post by:
Hi folks ! got this problem... i have a table 'Accounts' in my database, which contains a bunch of users. From the main menu i choose "edit user" and all users in the db are presented in a table....
3
by: Beryl Small | last post by:
Hi, I have a third party software that needs to send information to an .aspx page for processing to communicate with an SQL database. The software sends the information something like this: ...
4
by: Steve | last post by:
Hi All, This problem is really annoying me, as I am sure there is a simple solution to it. If I try to read a querystring value in the Page_Load event and that querystring does not exist I...
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 querystring values, I don't need the querystring to...
1
by: S. Han | last post by:
When I type in "my.aspx?Detail=Factory+Entry" in IE browser, and retrieve the query string with the following code: string val = Request.QueryString; the returned val is not "Factory+Entry",...
6
by: Roshawn Dawson | last post by:
Hi, While browsing the web, I've noticed that a lot of websites have values in the url without any file extensions mentioned. Consider this (fake) url: http://www.yourdomain.com/article/1 ...
7
by: fox | last post by:
Hi, Lacking javascript knowledge, I just realized why my project has a bug. I am using ASP to loop through a set of records while it creates URLs with a querystring that has a single value pair....
2
by: exapplerep | last post by:
I've seen how to use VBA code to concatenate two fields into a third by using an expression in the "After Update" property in fields 1 & 2. field3 = field1 + field2 The above code would go...
2
by: Doogie | last post by:
Hi, I'm writing Javascript code to parse out a query string. I want to handle the case where a parameter value may not be sent. So consider a parameter called "State". If the user doesn't pass...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.