...

View Full Version : Styling asp questionnaire responses



kyllle
12-10-2009, 03:36 PM
Hi all,

I have created a questionnaire which uses asp, my question is how do I style the various text thats received by the user in their email, I know I can add <b> tags etc to the text but what about changing the font-family, adding backgrond colour etc to each questions heading etc.

I have provided a snippet of the code Im trying to style, hope you can help.


dim strEmailSend
strEmailSend = strEmailSend & "<b>Ticket Number:</b> " & request.Form("TicketNumber")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Date:</b> " & request.Form("date")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Client:</b> " & request.Form("Client")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Contact Name:</b> " & request.Form("con_name")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Phone Calls:</b> " & request.Form("phone")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Comments:</b> " & request.Form("phone_com")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Email:</b> " & request.Form("emails")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Comments:</b> " & request.Form("email_com")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Problem Resolution:</b> " & request.Form("resolution")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Comments:</b> " & request.Form("prob_res_com")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Problem Escalation:</b> " & request.Form("escalation")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Comments:</b> " & request.Form("prob_esc_inv_com")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Satisafaction with response:</b> " & request.Form("responses")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Comments:</b> " & request.Form("prob_esc_res_com")
strEmailSend = strEmailSend & "<br/><br/>"
strEmailSend = strEmailSend & "<b>Additional comments:</b> " & request.Form("Comments")

'response.Write(strEmailSend)

'sendemail(strEmailSend)

Thanks in advance!!

Kyle

Jazzo
12-11-2009, 03:11 AM
First off, DON'T USE HTML FORMATTING TAGS. I apologize for my cyber-yelling, but using CSS for all formatting is a good habit to get into. Instead of using bold tags, wrap each element in a span tag and add a style attribute. For example:



<span style="font-weight:bold;font-family:[YOUR FONT];background-color:[YOUR BG COLOR]>texttexttext</span>


For a complete CSS reference, see this page: http://www.w3schools.com/css/css_reference_atoz.asp



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum