Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database hyperlinks on .asp pages 2

Status
Not open for further replies.

TrueJoker

Technical User
Jun 14, 2006
115
0
0
GB
I'm not sure if this has to go on these pages or Access pages but here goes anyway.

I have a database search setup on a webpage using a MS Access database to hold the information.

I ahve tried hyperlinking say a website within the database field which works fine, but when it appears in the search it is not hyperlinked, instead shows the hyperlink address next to the text that i actually want hyperlinked.

Hmm that sounded confusing so i shall try to clarify....

say i want the word <link> to be linked to another webpage or website. Where this appears in the database i have hyperlinked it to the specific page but when it shows up in the search results it is not hyperlinked, so now im just curious and wondering if this is at all possible???
 
Do you have any relevant code that shows what you are trying to do in your ASP file?

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
I have connected to the database and everything is working except this text that i wish to be hyperlinked

at the moment it appears like so

Link#
the #.....# represent the address it should go to

The actual link itself has been created within the database. This is because the search calls on this data from the database
Code:
<%=(reMembership.Fields.Item("Profile").Value)%>
that is the portion of code that is used to call the information from the database
 
What is the value that is stored in your DB? Is it "
And are you calling it like this?:
Code:
<a href="<%=(reMembership.Fields.Item("Profile").Value)%>">Link</a>[/coce]

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
the value that is stored in the field within the database is `Link` but then i right click it and add a hyperlink to `
Code:
<a href="<%=(reMembership.Fields.Item("Profile").Value)%>">Link</a>[/code

is how the field containg `Link` is being called to appear on the web page which works for other information being shown on the page, but for some reason it doesnt like the hyperlink. So now im wondering if it is possible for a hyperlink to be carried across from the database and onto the webpage.
 
If you want to call the link within your ASP file, you can save the actual URL as a text field in your database and then reference it as you have above in your ASP file. I'm not sure how to reference a hyperlink (that is stored as a hyperlink in your DB) in the manner you've described - or if there even is a way.

In other words, just change your DB field to a text field and then put the URL into that text field. Then you can call that from your ASP file as you already have it. Does this make sense?

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
hmmm im not sure if i grasp it totatlly yet!

the problem with that solution if i understand it correctly would be that the search page that searchs the dtabase for information has been setup up in a repeatable region incase multiple results occur. As such if i was to make it a text field on the webpage, that field would be repeated with every search result, and if placed outside of the repeatable region would appear at the end of the search result list and may not appear with the correct information

as it stands the other information for example may include:-

Name:
Website:
profile:
etc....

website and profile being seperate pages that if possible link to another page when click.

I am beginning to think that what i have in mind for it to do is not possible and will just have to resort to having the URL there so it can be copied and pasted into the address bar.
 
I'm not sure I understand what the problem is. You are not making it a text field on your webpage. You are changing your database field from a hyperlink (which is possible to do in Access, apparently) into a text data type and then populating your link on your webpage (which you are creating with the <a> tag) with that database text field - which will, by default, convert it into a hyperlink on your webpage.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Ah i understand now and it is working fine at last thank you for your help! sorry for being confusing about my issue i have a hard time explaining myself at times
 
It's not a problem. I occasionally have a hard time making it clear what I need, too. ;-)

I'm glad that you got it resolved. [thumbsup]

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Chopstick,
You are the bomb... I had issues when I created an Access database that would store the link to images, but it was relatively similar to what you were explaining here, and you did a darn good job.

TrueJoker,
I thought you "stammered" through it well. I grimace at some of my posts in this forum actually. Oh well, I guess that is what forums are for... learning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top