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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying A Hyperlink Which is in a database field. ASP.net

Status
Not open for further replies.

BeginnerProgramer

Programmer
May 19, 2004
5
GB
Can Any Body Help

I have a link to a database and the database field contains
hyperlinks but when it is displayed on my webpage it is displayed as text and not a link, the field in my database
is set as hyperlinks

My ASP.net code

<%# LatestSites.FieldValue("Link", Container) %>

Can any body tell me how to get it to display as a hyperlink

Regards

BP
 
Well, first we need an example of what exactly is in the database.

Please clarify if your database field contains a simple URL, or an actual HTML anchor tag with text inside.
 
My Database Contains a Simple URL For example The database Field type is set to hyperlink

Also in the database field i have these settings

Required - yes
Allow Zero length -no
Indexed - Yes (no Dups)
Unicode commpression -yes
ime mode - No Controls
ime sentence mode - None

Is there any more information you need to solve the problem
as am new to this

Regards

BP
 
well i actually don't know what the field type "hyperlink" does. If it were me, I would set the field type to text, then do this:

<%
Response.Write("<a href=""" & codeforDBoutput & """>" & codeforDBoutput & "</a>")
%>

replace "codeforDBoutput" with code for your data's display
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top