Wrox Programmer Forums
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2004, 08:10 PM
Registered User
 
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Use a cookie to determine href choice?

I am using a cookie to write a condtional href to download whitepapers where if the user clicks on the whitpaper link, if it's their first time at the site, they need to fill out an info form and are directed to the form page.

If they have already done that than the link initiates the whitepaper download, in this case a PDF.

Here is my code:



<%
Response.Cookies("whitepaper") = "yes"
%>





<a href="<%If Request.Cookies("whitepaper")="yes" Then
response.write(“/index_files/products/white_papers/mr30_wp_final.pdf”)
Else
response.redirect(“/company/wp_submit/white_paper_submit_form.asp”)
end if%>">
</a>

here is the error:


Error Type:
Microsoft VBScript compilation (0x800A0408)
Invalid character
/products/white_papers.asp, line 37, column 15
response.write(“/index_files/products/white_papers/mr30_wp_final.pdf”)
--------------^

where line 37 is "response.write" etc....

Any suggestions are welcome....


Dan Englander
http://danenglander.net/
------------------------
 
Old April 22nd, 2004, 08:56 PM
Friend of Wrox
 
Join Date: May 2003
Posts: 202
Thanks: 0
Thanked 1 Time in 1 Post
Default

It looks like your double-quotes are the problem. They look like "smart" quotes (did you copy/paste from Word?). Replace them with standard double quotes and it should work.

Bruce Luckcuck
Director, Applications & Support Services
Wiley Publishing, Inc.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 8, href and HRef (p. 285) roman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 June 16th, 2008 10:40 AM
a choice Ritt VS.NET 2002/2003 2 August 25th, 2005 06:33 AM
Is Treeview the right choice? Renu ASP.NET 1.0 and 1.1 Basics 3 October 11th, 2004 03:08 PM
Choice of TFT Monitor ioates SQL Server 2000 2 July 6th, 2004 08:44 AM
Choice of TFT Monitor ioates Pro VB.NET 2002/2003 0 July 2nd, 2004 02:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.