If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > adding CSS class to ASP line

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-14-04, 14:03
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
adding CSS class to ASP line

I would like to add a CSS class (.month) to the following ASP line:

tmpHTML = tmpHTML & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",-1, EventDate)) & """>&#171;</a>" &
CurMonthName & "&#44;" & " "

How would I place the class in the line? I tried the following, but it didn't work.

tmpHTML = tmpHTML & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",-1, EventDate)) & class=""month"" &
""">&#171;</a>" & CurMonthName & "&#44;" & " "

Thanks for any help.
-D-
Reply With Quote
  #2 (permalink)  
Old 09-14-04, 16:47
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
try this:

tmpHTML = tmpHTML & "<a href=""?EventDate=" &
Server.URLEncode(DateAdd("m",-1, EventDate)) & "class=""month""" &
""">«</a>" & CurMonthName & "," & " "
Reply With Quote
  #3 (permalink)  
Old 09-14-04, 17:22
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
Thanks for replying to my post. I modified the code as you suggested, which did stop the syntax error from being thrown.

However, "class=" is being appended to the URL string with the rest of the querystring value instead of being recognized as a CSS class style within the page.

Definately a step closer though.

Here is the code as modified:
tmpHTML = tmpHTML & "<a href=""?EventDate=" & Server.URLEncode(DateAdd("m",-1, EventDate)) & "class=""month""" & """>&#171;</a>" & CurMonthName & "&#44;" & " "

Any ideas how to get it recognized as a CSS class style?
Thanks for your help.
-D-
Reply With Quote
  #4 (permalink)  
Old 09-15-04, 02:06
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Try:

tmpHTML = tmpHTML & "<a href=""?EventDate=" & Server.URLEncode(DateAdd("m",-1, EventDate)) & """ class=""month""" & ">«</a>" & CurMonthName & ", "
__________________
That which does not kill me postpones the inevitable.
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On