Home > Microsoft SQL Server > Links from database not displaying properly in ASP

Links from database not displaying properly in ASP



In my Access 2000 database, I have several tables in which I am storing information about various countries. One is a lookup table with countryID and countryName. In a related table, I am storing hyperlinks that are relevant for each country, such as immunization requirements, etc. I'm running this on my Windows XP machine with IIS 5.<br><br><ul><li>When trying to display the links in ASP, the hyperlinks are displayed as text or in the following manner: <br><br><div class="msgQuoteWrap"><div class="msgCode">#http://www.cdc.gov/travel/easteurp.htm#</div></div><br><br>How can I correct this?</ul><br><br><ul><li>If possible, I'd like to wrap the hyperlink around text that is hardcoded into the page. For instance, I want the page to display:<br><br>US Health Immunization Requirements<br><br>But I want the above text to be the content between the <a>tags with the HREF = the hyperlink from the database. Is that possible? </ul><br><br><ul><li>Furthermore, I would like to set the links so that these links open in a new browser.</ul><br><br>Please help!

    
Guest


You need to make sure that the URL is stored as text in Access and NOT as a hyperlink field.<br><br>The you just call the field into the link<br><br>a href="<%= RECORDSET(FIELD) %>" TARGET = "_BLANK<br><br>Then write your text and close the tag /a

Was this answer helpful ? Yes No   
Guest


because you have probably tride the hyperlink field then changed to text? If you did then go to the database and remove all the # at the start and end. This should be a text field like the last post said

Was this answer helpful ? Yes No   
Guest


Thanks, the code above worked perfectly, and yes, one needs to remove the pound signs from the access data once you convert back to text. In this case I had to convert to memo because some of my links were concatenated. I really appreciate all your help. I knew one of you would have the answer!

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved