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 26th, 2009, 11:56 AM
Registered User
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Response Write Syntax help

Hi,

First I apologize, I'm not a coding person, but I need some assistance please. I want to make the asterisks in this line of code red and normal html is not working.

Response.Write("<br />**Address Information must match your credit card billing information**<br /><br />")

I have tried:

Response.Write("<br /><font color="#FF0000">**</font>Address Information must match your credit card billing information<font color="#FF0000">**</font><br /><br />")

and I get an error.

Please help!
Thank you so much!
 
Old April 26th, 2009, 01:47 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The font tag has been depricated a long time ago, and as such it's no longer recommended to use it. Instead, you should use CSS. You probably already have some CSS in your page that overrules the color set by the font tag. If that's the case you can't even use the font tag anymore. Try this:
Code:
Response.Write("<br /><span style="color: red;">*</span>.... rest of the code here")
Rather than applying a style to a span, you could also use a CSS class. Add the following to your CSS file:
Code:
 
.Attention
{
  color: red;
}
Then modify your code as follows:
Code:
Response.Write("<br /><span class="Attention">*</span>.... rest of the code here")
With this code, you can now control the color of the attention text from a single location.

For more information on CSS: http://www.wrox.com/WileyCDA/WroxTit...470096977.html

Hope this helps,

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Last edited by Imar; April 26th, 2009 at 01:48 PM.. Reason: Added code blocks
 
Old April 26th, 2009, 04:00 PM
Registered User
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP syntax con't.

Hi,


I've tried that too and this is the error I get...


Microsoft VBScript compilation error '800a03ee'
Expected ')'
/auth/payNextUpdate.asp, line 152
Response.Write("<br /><span style="color: red;">**</span>Address Information must match your credit card billing information<span style="color: red;">**</span><br /><br />")
-----------------------------------^

Thank you!
 
Old April 26th, 2009, 04:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sorry about that. Forgot to double the quotes in the string:

Response.Write("<br /><span style=""color: red;"">*</span>.... rest of the code here")

By doubling them, their value is treated as a literal, rather than the end of the string you're writing.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 26th, 2009, 04:16 PM
Registered User
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Syntax

IMAR! You ROCK! Thank you so much!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
response.write crmpicco Classic ASP Basics 1 January 27th, 2005 06:31 PM
response.write spacing marketingmaggie Classic ASP Databases 2 October 16th, 2004 12:59 PM
response.write netcrawler Classic ASP Databases 4 September 29th, 2004 10:13 AM
Response.write Sach Classic ASP Components 5 March 19th, 2004 06:40 AM





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