Hyperlinking in a returned recordset

Discussion in 'ASP General' started by Micromanaged, Oct 5, 2004.

  1. Micromanaged

    Micromanaged Guest

    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:
    ) 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!
     
    Micromanaged, Oct 5, 2004
    #1
    1. Advertising

  2. If it were just static HTML, what would you do? <a
    href="mailto:p"></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" <> wrote in message
    news:%...
    >
    >
    > 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:
    > ) 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!
     
    Ray Costanzo [MVP], Oct 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    5
    Views:
    4,800
    mkr04
    Sep 7, 2006
  2. Gmansky

    hyperlinking to a new page

    Gmansky, Jun 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    553
    EijiTek
    Jun 27, 2004
  3. Daniel

    Hyperlinking an Image

    Daniel, Sep 28, 2007, in forum: HTML
    Replies:
    6
    Views:
    381
    Jonathan N. Little
    Sep 29, 2007
  4. Nedu N

    Hyperlinking and ASP.NEt Session

    Nedu N, Dec 7, 2003, in forum: ASP .Net Building Controls
    Replies:
    5
    Views:
    143
    Munsifali Rashid
    Dec 9, 2003
  5. Crazy Learner
    Replies:
    0
    Views:
    155
    Crazy Learner
    Jul 22, 2003
Loading...

Share This Page