p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 30th, 2003, 06:30 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using quotes in VBSCript and an asp page

Please help a fairly new user of both VBScript and asp pages:

I have a form on what we'll call page1.htm that brings a variable called name into page2.asp. I then want to take this same variable from the first asp page (page2.asp) to another asp page (page3.asp) to use there as well. This is the code line I'm using to do this:

link = "page3.asp?gradname=" & name

the link variable is then used here:

<a class="ul" href="<%=link%>">Click Here</a>

Now, when I hover over the link created by the "Click Here" html tag, I can see the address the link will take me in the bottom left of my browser screen:

http://folder/folder/page3.asp?gradname=mr ed

where "mr ed" is the variable (called name) which I entered on page1.htm. So, the value of my variable has at least made it to this point. This code doesn't seem to want to work however, or I believe the variable isn't making it on to page3.asp, and I think this is because the above line has to look like:

http://folder/folder/page3.asp?gradname="mr ed"

(notice added quotes around variable). Not sure how to get these quotes added in so my code will work, please advise. I would also be open to other ways of doing this. Thank You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old July 30th, 2003, 09:13 PM
Friend of Wrox
Points: 2,244, Level: 19
Points: 2,244, Level: 19 Points: 2,244, Level: 19 Points: 2,244, Level: 19
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 587
Thanks: 1
Thanked 1 Time in 1 Post
Default

The quotes are not required.
Your code looks fine.
How are you refering to the variable on page 3.
are you using:

request("gradname")
or to write to the page
<%= request("gradname")%>

?
Have a look at the address bar on page 3 it should look something like

folder/page3.asp?gradname=mr%20ed

For future reference if you need to use a double quote in a string you escape it by using two double quotes.
eg strVariable = "This is a ""quote"" in your string"
So
<%= strVariable %>

Would look like

This is a "quote" in your string

Rod

======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old July 31st, 2003, 11:30 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the help, didn't know about the double quote thing. I think I figured out what I'm missing.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page 191 - Alias w/out quotes proslambano BOOK: Beginning SQL Server 2005 Programming ISBN: 978-0-7645-8433-6 1 June 17th, 2007 10:03 PM
displaying single quotes and double quotes ren_123 Classic ASP Databases 2 February 22nd, 2006 02:17 PM
Putting VBScript in an ASP.NET page jturlington ASP.NET 1.0 and 1.1 Basics 1 May 14th, 2005 10:00 PM
Optimization of ASP page with VBScript anandham VBScript 0 April 18th, 2005 06:03 AM
Inserting "Double Quotes" ASP?VBScript/SQL Server craigcsb Classic ASP Databases 1 July 4th, 2003 11:37 PM



All times are GMT -4. The time now is 07:23 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc