This topic is locked

vbcrlf nor <br> is working on my asp page.

10/1/2006 7:17:20 PM
ASPRunnerPro General questions
B
bburden author

I have a email script that I am using in my .....list.asp and it working great as far as being able to click the hyperlink (click to send to info) to open up Outlook. The problem that I have is that no matter what charcter I insert at the end of the line in my asp page it ignores it when outlook is open.
The text in Outllok appears as:
Please forward me information with regards.Customer: bren.burd@ts.comCost Center Manager:tjgirl@abc.netCost Center:CL9201. (no returns)
It shoud appear as:
Please forward me information with regards...
Customer: bren.burd@ts.com
Cost Center Manager:tjgirl@abc.net
Cost Center:CL9201
This is the code that shows on my ....list.asp
Response.write "<a href=""mailto:" & GetData(rs.Fields("emailto"),"") & "?subject=Service Ticket # " & GetData(rs.Fields("tkt_id"), "") & "&body=Please forward me information with regards."

"Cost Center Manager:" & GetData(rs.Fields("cc_manageremail"), "") [color=#FF0000]& vbCrLf & vbCrLf &

"Cost Center:" & GetData(rs.Fields("cost_center_tkt"), "")& """>Click to send info!</a>"
The vbcrlf and the
does work with my other ASP pages that I use in FrontPage.
Please help and thanks

Sergey Kornilov admin 10/3/2006

Brenda,
I asked you to send me a URL where I can see this page live.

B
bburden author 10/6/2006

For all the ones who wants to create a email link from within the database, hers's how you do it.
It works for plain text and also HTML text in Outlook. But the only problem I ran into was the output into Outlook. It was producing a single line of text with no returns, and vbcrlf and
just was not working.
I did not want to auto generate from the Table Event view, because I needed to control how the email was being sent. So I created a link from within the ASP database that would send the indivual records. This information is posted in the ..... list.asp page. Whatever name you use in your database for the link i.e., that's where this info will replace that text which was generate when you build your database.
So after a long long week of crying and praying and bearing my soul to customer support I finally got it to work. I had to use [color=#FF0000]+"%0D%0A" in the place of the other tags and it works perfect.
And for all of you who have had the same problems, I am glad to share the results with you.
Thanks to Sergey for all the hard work and patient he has with me.
<%

if IsBinaryField(rs.Fields("emailto")) or Format("emailto")=FORMAT_DATABASE_FILE then

Response.Write CreateImageControl(rs, "emailto", "")
strData = GetData(rs.Fields("emailto"), "HTML") ("cust_email", "cc_manager_email", "cost_center_tkt", "cc_manager_tkt", "first_name_cust", "last_name_cust", "service_issue","service_tkt_status")
else
Response.write "<a href=""mailto:" & GetData(rs.Fields("emailto"),"")& "&cc=" & GetData(rs.Fields("email_cust"), "")& "," &GetData(rs.Fields("cc_manager_email"), "") & "?subject=Service Ticket # " & GetData(rs.Fields("tktid"), "") & "&body=This ticket may be charged to your cost center. Cost Center manager please reply to this email for your approval". +"%0D%0A"+"%0D%0A" &

"Customer: "&GetData(rs.Fields("first_name_cust"), "")& " " &GetData(rs.Fields("last_namecust"), "")+"%0D%0A" +"%0D%0A" &

"Cost Center Manager: "& GetData(rs.Fields("cc_managertkt"), "")+"%0D%0A" +"%0D%0A" &

"Cost Center: "& GetData(rs.Fields("cost_centertkt"), "")+"%0D%0A" +"%0D%0A" &

"Service Issue: "& GetData(rs.Fields("serviceissue"), "")+"%0D%0A" +"%0D%0A" &

"Service Ticket Status:" & GetData(rs.Fields("service_tkt_status"), "")& """>Click to send record info!</a>"
end if
%>