We have an old classic ASP application that pulls a URL from an MSSQL database and we've had people recently ask about the URL, when clicked, going to a relative path. So, we'd have a URL of http://ourdomain.com/db_url and of course that link wouldn't exist.
I need to fix that output to the browser window, so that if a user clicks the URL, it takes them to the actual URL.
What I have in place, that works is:
strURL = objProfile.FieldValue("pro_url")
strURL = Replace(objProfile.FieldValue("db_url"),"http://","",1,1,1)
Then to display, I have:
<a href="http://<%=Response.Write(strURL)%>" target="_new"><%=objProfile.TextField("db_url",Adminedit,,50,50)%></a>
So, that Replace function works perfect, but what I've run into now, is that I can no longer edit the URL
from the web application.
Before this issue, I had this in place:
<a href="http://<%=objProfile.TextField("db_url",noedit,,50,50)%>" target=_new"><%=objProfile.TextField("db_url",Adminedit,,50,50)%></a>
when in edit mode, gives the user an editable field.
I've tried various forms and combinations to try and get the edit function back with no luck.
Is there a better way to do this? Or, is there a way to modify this so I can edit again?