469,290 Members | 1,866 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Hyperlinking in a returned recordset



I have a customers table in my database (SQL 2k) with a column called
[E-mail]. What I would like to set up (if possible) is to have the ASP
page, as it returns the requested recordset, if it has an email address
to display the email address as a hyperlink (i.e. mailto:
so*****@somedomain.com) while showing the email address so the end users
can just click on the email address field and have it pull up a new mail
message with the To: address filled in.

Thoughts?

Thanks in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 1165
If it were just static HTML, what would you do? <a
href="mailto:pe****@domain.om">pe****@domain.om</a>, right? Well, part of
the function of ASP is to return HTML, so just have it return HTML like that
by just substituting the hard-coded e-mail address for a variable that
represents it. For example:

<%
sEmail = yourRecordset.Fields.Item(0).Value
%>
<a href="mailto:<%=sEmail%>"><%=sEmail%></a>

Ray at work

"Micromanaged" <no*****@nospam.org> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...


I have a customers table in my database (SQL 2k) with a column called
[E-mail]. What I would like to set up (if possible) is to have the ASP
page, as it returns the requested recordset, if it has an email address
to display the email address as a hyperlink (i.e. mailto:
so*****@somedomain.com) while showing the email address so the end users
can just click on the email address field and have it pull up a new mail
message with the To: address filled in.

Thoughts?

Thanks in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.