Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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!
Reply With Quote
  #2 (permalink)  
Old April 26th, 2009, 01:47 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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
Reply With Quote
  #3 (permalink)  
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!
Reply With Quote
  #4 (permalink)  
Old April 26th, 2009, 04:03 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
  #5 (permalink)  
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!!
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.