Database hyperlink problems

F

Fawke101

Hi there,

I have an SQL database that has a description column containing a
description of the field and in some cases hyperlinked words that point to
another page, so when the column is displayed in ASP it will be displayed as
a hyperlink.

I am writing an admin tool in ASP that edits this column. Upon clicking on
an EDIT button the user i directed to a page with a series of text boxes.
Each text box contains the value of a field in the table explained above, so
the user can change, then update the relevant record.

Basically, the problem i am having is the field with the <ahref="........>
hyperlink in it is still displaying as a hyperlink, outside the text box.
What i want it to do is display the text used to make the hyperlink (exactly
what is in the database field, rather than the hyperlin k itself)
How can i encode this as a string (i have tried
<%=string(RS("Description"))%> ) and that doesnt work.

I hope you guys can help?

Thanks
--
Thanks in advance

Fawke

Please remove ANTI and SPAM
from my email address before emailing me.

www.bradflack.com
 
B

Bob Barrows

Fawke101 said:
Basically, the problem i am having is the field with the
<ahref="........> hyperlink in it is still displaying as a hyperlink,
outside the text box. What i want it to do is display the text used
to make the hyperlink (exactly what is in the database field, rather
than the hyperlin k itself)
How can i encode this as a string (i have tried
<%=string(RS("Description"))%> ) and that doesnt work.

I hope you guys can help?

Thanks

<%=server.htmlencode(RS("Description"))%> )

Bob Barrows
 
R

roger

"Fawke101" wrote
Basically, the problem i am having is the field with the <ahref="........>
hyperlink in it is still displaying as a hyperlink, outside the text box.

That's a browser problem, not to do with ASP.

The following works in IE version 6.0.2800.873W7738heh47g3hjhbX165

<textarea rows=2 cols=30 id=textarea1 name=textarea1>
<a href="http://">http://</a>
</textarea>

and so does this -

<input type="text" size=50 id=text1 name=text1 value='<a
href="http://">http://</a>'>

but you'll need to deal with any single quotes in the text.
 
F

Fawke101

Thanks for that, all working using the HTML encode, i tried urlencode - to
no avail, obviously ;-)

Thanks again

--
Thanks in advance

Fawke

Please remove ANTI and SPAM
from my email address before emailing me.

www.bradflack.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top