Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I display a hyperlink when showing database search results? (ASP)

    In my site we have a search form that displays records from a database. One of the fields contains web links, which I would like to display as html web links in the asp results page. I am not sure how to get this to work. Any ideas anyone?

    The search results page can be found at http://www.munzamedia.co.uk/trip/cou...=Find+a+course

    My code to display the result as a link, currently looks like this:

    <tr>
    <td><strong>Web Link : </strong>
    <a href = "
    <%
    Response.Write(RSCustomerList("website"))
    %>
    ">Link</a>
    </a>
    <hr align="left" noshade width = "400" color = "#FD5583">
    </td>
    </tr>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying a link?

    I don't understand what you're after: by what I'm seeing, you are displaying a HTML link. Or do you mean to alter the "link" text?
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,088
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Aside from the fact that you have an extra </a> closing tag, your code looks fine.

    BTW, when including code in your posts, you need to enclose your code in the code tags (the # icon in the reply window).
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #4
    New Coder
    Join Date
    Apr 2005
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ronaldb66
    I don't understand what you're after: by what I'm seeing, you are displaying a HTML link. Or do you mean to alter the "link" text?
    If you try and click the link, it does nothing. If you hover the mouse over the word that says 'link', the string is incorrect, it should be http://www.derby.ac.uk/C3_pg.asp?Id=287&SubjectID=46


    Thanks for getting back to me quickly.
    M

  • #5
    New Coder
    Join Date
    Apr 2005
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    solved & thanks

    I actually fixed this problem by changing the links in the database from hyperlink type fields to memo fields, which added the unnecessary #s.

    On another forum someone suggested a good workaround using the replace function:

    Code:
    <tr>
    <td><strong>Web Link : </strong>
    <a href = "<%=Replace(RSCustomerList("website"),'#','')%>">Link</a>
    <hr align="left" noshade width = "400" color = "#FD5583">
    </td>
    </tr>
    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •