#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    3
    Rep Power
    0

    Recordset containing hyperlink


    Hi, I am trying to create a page that contains a recordset and one of the fields to be a hyperlink to a download.

    I am using an Access database and don't seem to be able to make the hyperlinks 'active'.

    Any help would be greatly appreciated.

    Thanks

    Ozric
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Bavaria, Germany
    Posts
    140
    Rep Power
    13
    Code:
    ' ...
    
    While Not lRS.EOF
      ' ...
      Response.Write "<a href=""" & lRS.Fields("link").Value & """>" & lRS.Fields("link").Value & "</a>"
      ' ...
      lRS.MoveNext
    Wend
    is this what you want?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    3
    Rep Power
    0
    Sorry Wingman, I'm a bit of a noob with ASP, here is the code I am dealing with:

    While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
    %>
    <tr>
    <td align="default" width="25%">
    <%=(Recordset1.Fields.Item("Type").Value)%> </td>
    <td align="default" width="25%"><%=(Recordset1.Fields.Item("Location").Value)%></td>
    </tr>
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    Recordset1.MoveNext()
    Wend

    The "Location" variable is the one that is to be a hyperlink, I can't see how I can apply the code that you have sent, can you (or anyone else) advise further please.

    Thanks

    Ozric
    Last edited by ozric; April 8th, 2003 at 06:25 AM.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Bavaria, Germany
    Posts
    140
    Rep Power
    13
    Code:
    <% While (NOT Recordset1.EOF)  %>
    <tr> 
    <td align="default" width="25%"> 
    <%=(Recordset1.Fields.Item("Type").Value)%> </td>
      <td align="default" width="25%">
        <a href="<%=Recordset1.Fields.Item("Location").Value%>"><%=(Recordset1.Fields.Item("Location").Value)%></a>
      </td>
    </tr>
    <% 
      Recordset1.MoveNext
    Wend
    %>
    This should do the trick
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    3
    Rep Power
    0

    Talking


    Lovely job

    Thanks alot Wingman.

    Ozric

IMN logo majestic logo threadwatch logo seochat tools logo