This topic is locked
[SOLVED]

 Noob with Hyperlink issues

12/2/2008 7:29:29 AM
ASPRunnerPro General questions
M
Marty B author

Hi all,

I am trying out ASPrunner 6.0 and am having the following issue.
I have an access database with one of the fields containing the path to files that I would like my users to link to.
example:

field name: DocPath

Field format: Text

field Contents: \docs\filename.doc
In the ASP Runner visual editor, I have edited the field for DocPath and changed the "View as" property as Hyperlink and the Display word as "Download"
When I compile the project I place the built files into the /asprunnercode folder on the webserver. When I view the page, the field displays "Download" as a hyper link as it should but the link itself instead of being
\docs\filename.doc,
it is

http://mywebsite.com/asprunnercode/\d...92;filename.doc
How do I prevent the http://mywebsite.com/asprunnercode/ from being appended to the path that is stored in the Docpath field?
I read in another post to place http://mywebsite.com/ in the database field contents. I would rather not hard code the entire path in the field data if I dont have to. This makes it difficult to run on a testing server.
Any help that anyone can provide is greatly appreciated.

J
Jane 12/2/2008

Hi,
use custom format on the "View as" settingsdialog on the Visual Editor tab to convert field path in the database to the correct link.

Replace all \ with / and add correct prefix if needed.

Here is a sample:

if strValue<>"" then

strValue = "<a href=""http://mywebsite.com"; & Replace(strValue, "\", "/") & """>Download<a>"

end if

M
Marty B author 12/2/2008

Thanks very much. That worked perfectly. Thank you for your help and for such a fast reply.