|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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!
|
|
#2
|
|||
|
|||
|
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
|
|
#3
|
|||
|
|||
|
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
|
|
#4
|
|||
|
|||
|
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!
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Links from database not displaying properly in ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|