For Programmers: Free Programming Magazines  


Home > Archive > ASP > September 2004 > How to use href for email address pulled from database









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to use href for email address pulled from database
Jack

2004-09-24, 8:55 pm

Hi, I have the following code which displays email address from a database
However, I need to have the email address highlighted so that on clicking
the email box would open up with the email name filled in. Any thoughts or
help is appreciated.
Thanks.

CODE:

If Not IsNull(Recordset1("PeopletEmailAddress")) then Response.Write
Recordset1.Fields("PeopletEmailAddress")
Response.Write "</TD>"

Ray Costanzo [MVP]

2004-09-24, 8:55 pm

How would you do it if it where just a static html page you were writing?

<a href="mailto:jack@somedom.ain">jack@somedom.ain.com</a>


So, how about

If Not IsNull(Recordset1("PeopletEmailAddress")) then
Response.Write "<a href=""mailto:" &
Recordset1.Fields("PeopletEmailAddress") & """>" &
Recordset1.Fields("PeopletEmailAddress") & "</a>"
Response.write "</td>"
End if

Ray at work



"Jack" <Jack@discussions.microsoft.com> wrote in message
news:452875AF-AECF-41B3-B123-ECAA7084F0DF@microsoft.com...
> Hi, I have the following code which displays email address from a database
> However, I need to have the email address highlighted so that on clicking
> the email box would open up with the email name filled in. Any thoughts or
> help is appreciated.
> Thanks.
>
> CODE:
>
> If Not IsNull(Recordset1("PeopletEmailAddress")) then Response.Write
> Recordset1.Fields("PeopletEmailAddress")
> Response.Write "</TD>"
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com